Game.UI.InGame.InfoviewMenu
Assembly: Assembly-CSharp
Namespace: Game.UI.InGame
Type: class
Base: GamePanel
Summary:
InfoviewMenu is a small UI panel class used by the game to present the "info view" menu in-game. It fixes itself to the left side of the screen and indicates that it should retain selection state when the UI focus changes. This class contains only a couple of simple property overrides and otherwise relies on GamePanel for behavior and lifecycle.
Fields
- (none)
No private or public fields are declared directly in this class; state and behavior are provided by the GamePanel base class and the overridden properties.
Properties
-
public override LayoutPosition position { get; }
This override returns LayoutPosition.Left, meaning the InfoviewMenu is intended to be placed in the left layout slot of the game's UI. Modders can read this property to determine where the panel will be docked by the UI layout system. -
public override bool retainSelection { get; }
This override returns true, indicating the panel wants to retain selection state (for example, keep highlighting or the selected item) even when UI focus changes. This is useful for panels that should preserve user selection across context switches.
Constructors
public InfoviewMenu()
No explicit constructors are declared in the source; the default parameterless constructor is used. Initialization and lifecycle behavior (creation, showing, hiding) are handled by the GamePanel base class and the UI system.
Methods
- (none)
The class does not declare methods of its own. All behavior comes from inherited GamePanel methods and from the overridden properties above. If you need custom behavior, subclass InfoviewMenu or extend GamePanel directly and override lifecycle methods like OnCreate, OnEnable, OnDisable, etc.
Usage Example
// Simple example: creating and inspecting the panel
var infoview = new Game.UI.InGame.InfoviewMenu();
Debug.Log(infoview.position); // prints: Left
Debug.Log(infoview.retainSelection); // prints: True
// Typically you don't instantiate panels manually in Cities: Skylines 2 mods.
// Instead, create a subclass or add your UI element to the game's UI hierarchy.
{{ YOUR_INFO }}