Skip to content

Game.UI.InGame.CityInfoPanel

Assembly:
Assembly-CSharp

Namespace:
Game.UI.InGame

Type:
class

Base:
TabbedGamePanel

Summary:
UI panel representing the city information panel in-game. Provides two built-in tabs (Demand and CityPolicies). This panel is marked as blocking (prevents interaction with underlying UI) and is positioned in the center of the screen. Intended to be used as a top-level in-game panel for displaying city-related information and settings.


Fields

  • This class does not declare any private or public instance fields in the provided source.
    The panel's state is driven by its base class (TabbedGamePanel) and any internal implementation not exposed in this snippet.

  • Nested types: public enum Tab
    Defines the available tabs shown by the panel:

  • Demand
  • CityPolicies
    Use this enum to refer to tabs programmatically where the API expects a tab identifier.

Properties

  • public override bool blocking { get; }
    Indicates that the panel is blocking (true). When true, the panel prevents interaction with other UI elements beneath it. In this class the property is overridden to always return true.

  • public override LayoutPosition position { get; }
    Indicates the panel's layout position. This class overrides the property to return LayoutPosition.Center, so the panel is placed in the center of the screen.

Constructors

  • public CityInfoPanel()
    No explicit constructor is declared in the provided source; the default parameterless constructor will be used. Initialization logic, if any, may be implemented in the base class or elsewhere.

Methods

  • This class does not declare any methods in the provided snippet beyond the property overrides inherited from the base. Any lifecycle or behavior methods (creation, setup, tab handling) are likely implemented in the base class (TabbedGamePanel) or elsewhere.

Usage Example

// Referencing the tab enum:
var demandTab = Game.UI.InGame.CityInfoPanel.Tab.Demand;

// Example: checking panel properties (assuming you have an instance)
CityInfoPanel panel = /* obtain reference from UI manager or creation code */;
bool isBlocking = panel.blocking; // true
var pos = panel.position; // LayoutPosition.Center

// Using the enum in logic:
switch (demandTab)
{
    case CityInfoPanel.Tab.Demand:
        // show demand tab logic
        break;
    case CityInfoPanel.Tab.CityPolicies:
        // show city policies tab logic
        break;
}