public override void Initialize() { DiplomacyUI.SyncDiplomacyPopup(this._app, this.ID, this._otherPlayer); PlayerInfo playerInfo1 = this._app.GameDatabase.GetPlayerInfo(this._app.Game.LocalPlayer.ID); PlayerInfo playerInfo2 = this._app.GameDatabase.GetPlayerInfo(this._otherPlayer); this._app.UI.SetEnabled("btnDemMoney", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo2, DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.SavingsDemand))); this._app.UI.SetEnabled("btnDemSystemInfo", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo2, DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.SystemInfoDemand))); this._app.UI.SetEnabled("btnDemResearchPoints", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo2, DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.ResearchPointsDemand))); this._app.UI.SetEnabled("btnDemSlaves", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo2, DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.SlavesDemand))); this._app.UI.SetEnabled("btnDemWorld", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo2, DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.WorldDemand))); this._app.UI.SetEnabled("btnDemProvince", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo2, DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.ProvinceDemand))); this._app.UI.SetEnabled("btnDemSurrender", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo2, DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.SurrenderDemand))); this._app.UI.SetButtonText("btnDemMoney", string.Format(App.Localize("@UI_DIPLOMACY_DEMAND_SAVINGS"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.SavingsDemand)))); this._app.UI.SetButtonText("btnDemSystemInfo", string.Format(App.Localize("@UI_DIPLOMACY_DEMAND_SYSTEMINFO"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.SystemInfoDemand)))); this._app.UI.SetButtonText("btnDemResearchPoints", string.Format(App.Localize("@UI_DIPLOMACY_DEMAND_RESEARCHPOINTS"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.ResearchPointsDemand)))); this._app.UI.SetButtonText("btnDemSlaves", string.Format(App.Localize("@UI_DIPLOMACY_DEMAND_SLAVES"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.SlavesDemand)))); this._app.UI.SetButtonText("btnDemWorld", string.Format(App.Localize("@UI_DIPLOMACY_DEMAND_WORLD"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.WorldDemand)))); this._app.UI.SetButtonText("btnDemProvince", string.Format(App.Localize("@UI_DIPLOMACY_DEMAND_PROVINCE"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.ProvinceDemand)))); this._app.UI.SetButtonText("btnDemSurrender", string.Format(App.Localize("@UI_DIPLOMACY_DEMAND_SURRENDER"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.DEMAND, new RequestType?(), new DemandType?(DemandType.SurrenderDemand)))); if (this._app.AssetDatabase.GetFaction(playerInfo1.FactionID).HasSlaves()) { this._app.UI.SetPropertyInt("pnlDemand", "height", 210); this._app.UI.SetPropertyInt(this._app.UI.Path("pnlDemand", "pnlBoxPanel"), "height", 160); this._app.UI.SetVisible("btnDemSlaves", true); } else { this._app.UI.SetPropertyInt("pnlDemand", "height", 190); this._app.UI.SetPropertyInt(this._app.UI.Path("pnlDemand", "pnlBoxPanel"), "height", 140); this._app.UI.SetVisible("btnDemSlaves", false); } }
public override void Initialize() { this._crits.Activate(); this._starmap.Sync(this._crits); this._app.UI.Send((object)"SetGameObject", (object)this._app.UI.Path(this.ID, "ohStarmap"), (object)this._starmap.ObjectID); DiplomacyUI.SyncDiplomacyPopup(this._app, this.ID, this._otherPlayer); this.SyncSystemSelect(); }
public override void Initialize() { PlayerInfo playerInfo = this._app.GameDatabase.GetPlayerInfo(this._app.LocalPlayer.ID); this._app.GameDatabase.GetPlayerInfo(this._otherPlayer); DiplomacyUI.SyncDiplomacyPopup(this._app, this.ID, this._otherPlayer); this._app.UI.SetEnabled("btnMoney", playerInfo.Savings > 0.0); this._app.UI.SetEnabled("btnResearch", playerInfo.Savings > 0.0); this._app.UI.SetButtonText("btnMoney", string.Format(App.Localize(GiveTypeDialog.GiveTypeLocMap[GiveType.GiveSavings]))); this._app.UI.SetButtonText("btnResearch", string.Format(App.Localize(GiveTypeDialog.GiveTypeLocMap[GiveType.GiveResearchPoints]))); }
public override void Initialize() { this._app.GameDatabase.GetPlayerInfo(this._app.LocalPlayer.ID); PlayerInfo playerInfo = this._app.GameDatabase.GetPlayerInfo(this._otherPlayer); DiplomacyUI.SyncDiplomacyPopup(this._app, this.ID, this._otherPlayer); this._app.UI.SetEnabled("btnReqMoney", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo, DiplomacyAction.REQUEST, new RequestType?(RequestType.SavingsRequest), new DemandType?())); this._app.UI.SetEnabled("btnReqSystemInfo", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo, DiplomacyAction.REQUEST, new RequestType?(RequestType.SystemInfoRequest), new DemandType?())); this._app.UI.SetEnabled("btnReqResearchPoints", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo, DiplomacyAction.REQUEST, new RequestType?(RequestType.ResearchPointsRequest), new DemandType?())); this._app.UI.SetEnabled("btnReqMilitaryAssistance", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo, DiplomacyAction.REQUEST, new RequestType?(RequestType.MilitaryAssistanceRequest), new DemandType?())); this._app.UI.SetEnabled("btnReqGatePermission", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo, DiplomacyAction.REQUEST, new RequestType?(RequestType.GatePermissionRequest), new DemandType?())); this._app.UI.SetEnabled("btnReqEstablishEnclave", this._app.Game.CanPerformLocalDiplomacyAction(playerInfo, DiplomacyAction.REQUEST, new RequestType?(RequestType.EstablishEnclaveRequest), new DemandType?())); this._app.UI.SetButtonText("btnReqMoney", string.Format(App.Localize("@UI_DIPLOMACY_REQUEST_SAVINGS"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.REQUEST, new RequestType?(RequestType.SavingsRequest), new DemandType?()))); this._app.UI.SetButtonText("btnReqSystemInfo", string.Format(App.Localize("@UI_DIPLOMACY_REQUEST_SYSTEMINFO"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.REQUEST, new RequestType?(RequestType.SystemInfoRequest), new DemandType?()))); this._app.UI.SetButtonText("btnReqResearchPoints", string.Format(App.Localize("@UI_DIPLOMACY_REQUEST_RESEARCHPOINTS"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.REQUEST, new RequestType?(RequestType.ResearchPointsRequest), new DemandType?()))); this._app.UI.SetButtonText("btnReqMilitaryAssistance", string.Format(App.Localize("@UI_DIPLOMACY_REQUEST_MILITARYASSISTANCE"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.REQUEST, new RequestType?(RequestType.MilitaryAssistanceRequest), new DemandType?()))); this._app.UI.SetButtonText("btnReqGatePermission", string.Format(App.Localize("@UI_DIPLOMACY_REQUEST_GATEPERMISSION"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.REQUEST, new RequestType?(RequestType.GatePermissionRequest), new DemandType?()))); this._app.UI.SetButtonText("btnReqEstablishEnclave", string.Format(App.Localize("@UI_DIPLOMACY_REQUEST_ESTABLISHENCLAVE"), (object)this._app.Game.GetDiplomacyActionCost(DiplomacyAction.REQUEST, new RequestType?(RequestType.EstablishEnclaveRequest), new DemandType?()))); }
public override void Initialize() { DiplomacyUI.SyncDiplomacyPopup(this._app, this.ID, this._otherPlayer); this.SyncScalar(); }