public override void Initialize() { this.App.UI.UnlockUI(); this.App.UI.SetListCleanClear("system_list", true); EmpireBarUI.SyncTitleFrame(this.App); this._planetWidgets = new List <PlanetWidget>(); this.SyncPlanetList(); }
protected override void OnEnter() { base.OnEnter(); this.UI.SetVisible("overlayStationList", false); this.UI.SetVisible("stationTypes", true); EmpireBarUI.SyncTitleFrame(this.App); this.App.UI.ClearItems("station_list"); List <StationInfo> upgradableStations = this.App.Game.GetUpgradableStations(this.App.GameDatabase.GetStationForSystemAndPlayer(this.TargetSystem, this.App.LocalPlayer.ID).ToList <StationInfo>()); foreach (StationInfo stationInfo in upgradableStations) { this.App.UI.AddItem("station_list", string.Empty, stationInfo.OrbitalObjectID, string.Empty); StationUI.SyncStationDetailsWidget(this.App.Game, this.App.UI.GetItemGlobalID("station_list", string.Empty, stationInfo.OrbitalObjectID, string.Empty), stationInfo.OrbitalObjectID, true); } OrbitalObjectInfo orbitalObjectInfo = this._app.GameDatabase.GetOrbitalObjectInfo(this.StartSelect); this.SelectedStation = orbitalObjectInfo == null || orbitalObjectInfo.StarSystemID != this.TargetSystem ? upgradableStations[0].OrbitalObjectID : this.StartSelect; this.App.UI.SetSelection("station_list", this.SelectedStation); }
public override void Initialize() { this.App.UI.UnlockUI(); 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 = PlanetManagerDialog.PlanetFilterMode.AllPlanets; this.App.UI.AddItem("orderDropdown", "", 0, App.Localize("@UI_PLANET_MANAGER_ORDERBY_POS")); this.App.UI.AddItem("orderDropdown", "", 1, App.Localize("@UI_PLANET_MANAGER_ORDERBY_HAZARD")); this.App.UI.AddItem("orderDropdown", "", 2, App.Localize("@UI_PLANET_MANAGER_ORDERBY_SIZE")); this.App.UI.AddItem("orderDropdown", "", 3, App.Localize("@UI_PLANET_MANAGER_ORDERBY_RESOURCES")); this.App.UI.AddItem("orderDropdown", "", 4, App.Localize("@UI_PLANET_MANAGER_ORDERBY_BIOSPHERE")); this.App.UI.AddItem("orderDropdown", "", 5, App.Localize("@UI_PLANET_MANAGER_ORDERBY_DEVCOST")); this.App.UI.AddItem("orderDropdown", "", 6, App.Localize("@UI_PLANET_MANAGER_ORDERBY_INFRA")); this.App.UI.SetSelection("orderDropdown", 0); this._currentOrderMode = PlanetManagerDialog.PlanetOrderMode.SystemOrder; this.App.UI.SetListCleanClear("system_list", true); EmpireBarUI.SyncTitleFrame(this.App); this._planetWidgets = new List <PlanetWidget>(); this.SyncPlanetList(); }