public override void Initialize() { this._systemWidget = new SystemWidget(this.App, this.App.UI.Path(this.ID, "starDetailsCard")); StarSystemInfo starSystemInfo = this._app.GameDatabase.GetStarSystemInfo(this._systemID); this._app.UI.SetText(this._app.UI.Path(this.ID, "intel_desc"), this._descriptor); this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "playerAvatar"), "sprite", Path.GetFileNameWithoutExtension(this._targetPlayer.AvatarAssetPath)); this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "playerBadge"), "sprite", Path.GetFileNameWithoutExtension(this._targetPlayer.BadgeAssetPath)); this._app.UI.SetVisible(this._app.UI.Path(this.ID, "system_map"), true); this._app.UI.SetVisible(this._app.UI.Path(this.ID, "gameStarSystemViewport"), false); this._app.UI.AddItem(this._app.UI.Path(this.ID, "gameViewportList"), "", 0, App.Localize("@SYSTEMDETAILS_SYS_MAP")); this._app.UI.AddItem(this._app.UI.Path(this.ID, "gameViewportList"), "", 1, "System"); this._app.UI.SetSelection(this._app.UI.Path(this.ID, "gameViewportList"), 0); this._crits = new GameObjectSet(this._app); this._camera = new OrbitCameraController(this._app); this._sky = new Sky(this._app, SkyUsage.InSystem, this._systemID); this._starsystem = new Kerberos.Sots.GameStates.StarSystem(this.App, 1f, this._systemID, Vector3.Zero, true, (CombatSensor)null, false, 0, false, true); this._starsystem.SetAutoDrawEnabled(false); this._starsystem.SetCamera(this._camera); this._starsystem.SetInputEnabled(true); this._starsystem.PostObjectAddObjects((IGameObject)this._sky); foreach (IGameObject state in this._starsystem.Crits.Objects.Where<IGameObject>((Func<IGameObject, bool>)(x => { if (!(x is StellarBody)) return x is StarModel; return true; }))) state.PostSetProp("AutoDrawEnabled", false); this._crits.Add((IEnumerable<IGameObject>)new IGameObject[3] { (IGameObject) this._camera, (IGameObject) this._sky, (IGameObject) this._starsystem }); this._app.UI.Send((object)"SetGameObject", (object)this._app.UI.Path(this.ID, "gameStarSystemViewport"), (object)this._starsystem.ObjectID); this._critsInitialized = false; this._camera.PostSetLook(new Vector3(0.0f, 0.0f, 0.0f)); this._camera.PostSetPosition(new Vector3(0.0f, 100000f, 0.0f)); this._camera.MaxDistance = 500000f; this._camera.MinDistance = 100000f; StarSystemUI.SyncSystemDetailsWidget(this._app, this._app.UI.Path(this.ID, "system_details"), this._systemID, false, true); StarSystemMapUI.Sync(this._app, this._systemID, this._app.UI.Path(this.ID, "system_map"), true); this._currentFilterMode = DialogSystemIntel.PlanetFilterMode.AllPlanets; this._planetWidgets = new List<PlanetWidget>(); this.SetSyncedSystem(starSystemInfo); this._systemWidget.Sync(this._systemID); }
public override void Initialize() { this._systemWidget = new SystemWidget(this.App, this.App.UI.Path(this.ID, "starDetailsCard")); StarSystemInfo starSystemInfo = this._app.GameDatabase.GetStarSystemInfo(this._systemID); this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "system_title"), "text", App.Localize("@SURVEY_OF") + " " + string.Format(App.Localize("@SURVEY_SYSTEM_THINGY"), (object)starSystemInfo.Name).ToUpperInvariant()); this._app.UI.SetVisible(this._app.UI.Path(this.ID, "system_map"), true); this._app.UI.SetVisible(this._app.UI.Path(this.ID, "gameStarSystemViewport"), false); this._app.UI.AddItem(this._app.UI.Path(this.ID, "gameViewportList"), "", 0, App.Localize("@SYSTEMDETAILS_SYS_MAP")); this._app.UI.SetSelection(this._app.UI.Path(this.ID, "gameViewportList"), 0); StarSystemUI.SyncSystemDetailsWidget(this._app, this._app.UI.Path(this.ID, "system_details"), this._systemID, false, true); StarSystemMapUI.Sync(this._app, this._systemID, this._app.UI.Path(this.ID, "system_map"), true); this._currentFilterMode = SystemSurveyDialog.PlanetFilterMode.AllPlanets; this._planetWidgets = new List <PlanetWidget>(); this.SetSyncedSystem(starSystemInfo); this._systemWidget.Sync(this._systemID); this.UpdateCanPlaceTraps(); }