Exemple #1
0
 protected override void UICommChannel_OnPanelMessage(
     string panelName,
     string msgType,
     string[] msgParams)
 {
     if (msgType == "list_sel_changed")
     {
         if (panelName == "filterDropdown")
         {
             this._currentFilterMode = (PlanetManagerState.PlanetFilterMode) int.Parse(msgParams[0]);
             this.SyncPlanetList();
         }
         else if (panelName == "sys_list_left")
         {
             StarSystemInfo starSystemInfo = this.App.GameDatabase.GetStarSystemInfo(int.Parse(msgParams[0]));
             if (starSystemInfo != (StarSystemInfo)null)
             {
                 this.SetSyncedSystem(starSystemInfo);
             }
         }
     }
     if (!(msgType == "button_clicked") || !(panelName == PlanetManagerState.UIExitButton))
     {
         return;
     }
     this.App.SwitchGameState <StarMapState>();
 }
Exemple #2
0
 protected override void OnEnter()
 {
     this.App.UI.UnlockUI();
     this.App.UI.SetScreen("PlanetManager");
     this.App.UI.AddItem("filterDropdown", "", 0, App.Localize("@UI_PLANET_MANAGER_ALL_PLANETS"));
     this.App.UI.AddItem("filterDropdown", "", 1, App.Localize("@UI_PLANET_MANAGER_SURVEYED_PLANETS"));
     this.App.UI.AddItem("filterDropdown", "", 2, App.Localize("@UI_PLANET_MANAGER_OWNED_PLANETS"));
     this.App.UI.AddItem("filterDropdown", "", 3, App.Localize("@UI_PLANET_MANAGER_ENEMY_PLANETS"));
     this.App.UI.SetSelection("filterDropdown", 0);
     this._currentFilterMode = PlanetManagerState.PlanetFilterMode.AllPlanets;
     this.App.UI.SetPropertyBool("gameExitButton", "lockout_button", true);
     EmpireBarUI.SyncTitleFrame(this.App);
     this._planetWidgets = new List <PlanetWidget>();
     this.SyncPlanetList();
 }