protected override void OnEnter() { base.OnEnter(); this.App.UI.SetScreen("StarSystem"); this._piechart = new BudgetPiechart(this.App.UI, "piechart", this.App.AssetDatabase); EmpireBarUI.SyncTitleBar(this.App, "gameEmpireBar", this._piechart); EmpireBarUI.SyncTitleFrame(this.App); this.InitializeClimateSlider(this.App.UI.Path("colonyControl", "partClimateSlider")); this.App.UI.SetPropertyBool(this.App.UI.Path("colonyControl", "partTradeSlider"), "only_user_events", true); this.App.UI.SetPropertyBool(this.App.UI.Path("colonyControl", "partTerraSlider"), "only_user_events", true); this.App.UI.SetPropertyBool(this.App.UI.Path("colonyControl", "partInfraSlider"), "only_user_events", true); this.App.UI.SetPropertyBool(this.App.UI.Path("colonyControl", "partShipConSlider"), "only_user_events", true); this.App.UI.SetPropertyBool(this.App.UI.Path("colonyControl", "partCivSlider"), "only_user_events", true); this.App.UI.SetPropertyBool(this.App.UI.Path("colonyControl", "partOverDevelopment"), "only_user_events", true); this.App.UI.SetPropertyBool("gameSystemContentsList", "only_user_events", true); this.App.UI.InitializeSlider(this.App.UI.Path("colonyControl", "partCivSlider"), 0, 100, 50); this.App.UI.InitializeSlider(this.App.UI.Path("colonyControl", "partTerraSlider"), 0, 100, 50); this.App.UI.InitializeSlider(this.App.UI.Path("colonyControl", "partInfraSlider"), 0, 100, 50); this.App.UI.InitializeSlider(this.App.UI.Path("colonyControl", "partShipConSlider"), 0, 100, 50); this.App.UI.InitializeSlider(this.App.UI.Path("colonyControl", "partOverDevelopment"), 0, 100, 50); this.InitializeClimateSlider(this.App.UI.Path("gamePlanetDetails", "partClimateSlider")); StarSystemUI.SyncSystemDetailsWidget(this.App, "systemDetailsWidget", this.CurrentSystem, false, true); StarSystemUI.SyncPlanetListWidget(this.App.Game, "planetListWidget", this.App.GameDatabase.GetStarSystemPlanets(this.CurrentSystem)); StarSystemUI.SyncColonyDetailsWidget(this.App.Game, "colonyDetailsWidget", this.SelectedObject, ""); StarSystemUI.SyncPlanetDetailsWidget(this.App.Game, "planetDetailsWidget", this.CurrentSystem, this.SelectedObject, this.GetPlanetViewGameObject(this.CurrentSystem, this.SelectedObject), this._planetView); this.App.HotKeyManager.AddListener((IKeyBindListener)this); }
protected override void OnEnter() { this._finalSync = false; this.App.UI.SetScreen("FleetManager"); this.App.UI.UnlockUI(); this.App.UI.GameEvent += new UIEventGameEvent(this.UICommChannel_GameEvent); this._sky.Active = true; this._camera = new OrbitCameraController(this.App); this._camera.DesiredPitch = MathHelper.DegreesToRadians(-75f); this._camera.TargetPosition = new Vector3(0.0f, 0.0f, 0.0f); this._camera.MaxDistance = 6000f; this._camera.DesiredDistance = this._camera.MaxDistance; this.App.UI.ClearItems("partFleetShips"); this._manager.PostSetProp("CameraController", (IGameObject)this._camera); this._manager.PostSetProp("InputEnabled", true); this._manager.PostSetProp("SyncShipList", "partFleetShips"); this._manager.PostSetProp("SyncCommandPointDisplay", "cmdpointsValue"); this._manager.Active = true; this.App.GameDatabase.GetPlayerHomeworld(this.App.LocalPlayer.ID); IEnumerable <FleetInfo> fleetInfoBySystemId = this.App.GameDatabase.GetFleetInfoBySystemID(this._targetSystemID, FleetType.FL_ALL); this.SyncShipContextMenu(fleetInfoBySystemId); EmpireBarUI.SyncTitleFrame(this.App); this._fleetWidget.SetSyncedFleets(fleetInfoBySystemId.Where <FleetInfo>((Func <FleetInfo, bool>)(x => { if (x.PlayerID == this.App.LocalPlayer.ID) { return(!Kerberos.Sots.StarFleet.StarFleet.IsGardenerFleet(this.App.Game, x)); } return(false); })).ToList <FleetInfo>()); this._manager.PostSetProp("FleetWidget", this._fleetWidget.ObjectID); this._fleetWidget.ShipSelectionEnabled = true; if (this.App.LocalPlayer.Faction.Name == "loa") { this.App.UI.SetEnabled("fleetmanagerloaCompose", true); this.App.UI.SetVisible("fleetmanagerloaCompose", true); this.App.UI.SetVisible("ngpWarning", true); } else { this.App.UI.SetEnabled("fleetmanagerloaCompose", false); this.App.UI.SetVisible("fleetmanagerloaCompose", false); this.App.UI.SetVisible("ngpWarning", false); } this.App.UI.AutoSize("buttonPanel"); this.App.UI.ForceLayout("buttonPanel"); this.App.UI.AutoSize("fleetDetailsWidget"); this.App.UI.ForceLayout("fleetDetailsWidget"); this.App.UI.AutoSize("leftPanel"); this.App.UI.ForceLayout("leftPanel"); this.App.UI.AutoSize("buttonPanel"); this.App.UI.ForceLayout("buttonPanel"); this.App.UI.AutoSize("fleetDetailsWidget"); this.App.UI.ForceLayout("fleetDetailsWidget"); this.App.UI.AutoSize("leftPanel"); this.App.UI.ForceLayout("leftPanel"); this.App.HotKeyManager.AddListener((IKeyBindListener)this); }
protected override void OnEnter() { base.OnEnter(); this._crits.Activate(); this._dummies.Activate(); this.App.UI.UnlockUI(); this.App.UI.SetScreen("StationPlacement"); this.App.UI.SetPropertyBool("gameCancelMissionButton", "lockout_button", true); this.App.UI.SetPropertyBool("gameConfirmMissionButton", "lockout_button", true); this.App.UI.SetPropertyBool("gameExitButton", "lockout_button", true); this._piechart = new BudgetPiechart(this.App.UI, "piechart", this.App.AssetDatabase); EmpireBarUI.SyncTitleFrame(this.App); EmpireBarUI.SyncTitleBar(this.App, "gameEmpireBar", this._piechart); this.Camera.DesiredPitch = MathHelper.DegreesToRadians(-40f); this.Camera.DesiredDistance = 80000f; this.Camera.MinPitch = MathHelper.DegreesToRadians(-60f); this.Camera.MaxPitch = MathHelper.DegreesToRadians(-20f); this._manager.Active = true; this._starsystem.SetAutoDrawEnabled(false); bool flag = false; if (this._stationType == StationType.MINING) { int?planetForStation = StarSystem.GetSuitablePlanetForStation(this.App.Game, this.App.LocalPlayer.ID, this._targetSystemID, this._stationType); if (planetForStation.HasValue) { this.SetSelectedObject(planetForStation.Value, ""); flag = true; } } else { foreach (PlanetInfo planetInfo in this.App.GameDatabase.GetPlanetInfosOrbitingStar(this._targetSystemID)) { if (planetInfo != null) { ColonyInfo colonyInfoForPlanet = this.App.GameDatabase.GetColonyInfoForPlanet(planetInfo.ID); if (colonyInfoForPlanet != null && colonyInfoForPlanet.PlayerID == this.App.LocalPlayer.ID) { this.SetSelectedObject(planetInfo.ID, ""); flag = true; break; } } } } if (!flag) { this.SetSelectedObject(-1, ""); } StationPlacementState.RefreshFleetAdmiralDetails(this.App, this._selectedFleetID); OverlayConstructionMission.RefreshMissionUI(this.App, this._selectedPlanetID, this._targetSystemID); OverlayConstructionMission.ReRefreshMissionDetails(this.App, this._missionEstimate); this.App.UI.AutoSizeContents("gameMissionDetails"); }
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(); }