public static FinishNowScreen ShowModalWithNoContract(SmartEntity selectedBuilding, OnScreenModalResult onModalResult, object modalResultCookie, int crystalCost) { FinishNowScreen finishNowScreen = FinishNowScreen.CreateFinishNowScreen(selectedBuilding, null, true, onModalResult, modalResultCookie); finishNowScreen.crystals = crystalCost; Service.ScreenController.AddScreen(finishNowScreen); return(finishNowScreen); }
public static FinishNowScreen ShowModalPerk(string perkId, OnScreenModalResult onModalResult, object modalResultCookie, int crystalCost, string title, string message, bool alwaysOnTop) { FinishNowScreen finishNowScreen = FinishNowScreen.CreateFinishNowPerkScreen(perkId, onModalResult, modalResultCookie); finishNowScreen.crystals = crystalCost; finishNowScreen.titleOverride = title; finishNowScreen.messageOverride = message; finishNowScreen.IsAlwaysOnTop = alwaysOnTop; Service.ScreenController.AddScreen(finishNowScreen); return(finishNowScreen); }
public static FinishNowScreen ShowModalWithNoContract(SmartEntity selectedBuilding, OnScreenModalResult onModalResult, object modalResultCookie, int crystalCost, string title, string message, bool alwaysOnTop) { FinishNowScreen finishNowScreen = FinishNowScreen.CreateFinishNowScreen(selectedBuilding, null, true, onModalResult, modalResultCookie); finishNowScreen.crystals = crystalCost; finishNowScreen.titleOverride = title; finishNowScreen.messageOverride = message; finishNowScreen.IsAlwaysOnTop = alwaysOnTop; Service.ScreenController.AddScreen(finishNowScreen); return(finishNowScreen); }
public static void ShowModal(SmartEntity selectedBuilding, OnScreenModalResult onModalResult, object modalResultCookie) { Contract contract = Service.ISupportController.FindCurrentContract(selectedBuilding.Get <BuildingComponent>().BuildingTO.Key); if (contract == null) { return; } FinishNowScreen screen = FinishNowScreen.CreateFinishNowScreen(selectedBuilding, contract, false, onModalResult, modalResultCookie); Service.ScreenController.AddScreen(screen); }
public static FinishNowScreen ShowModalEpisodeTask(EpisodeTaskVO vo, OnScreenModalResult onModalResult, object modalResultCookie, int crystalCost, string title, string message, bool alwaysOnTop) { FinishNowScreen finishNowScreen = new FinishNowScreen(); finishNowScreen.OnModalResult = onModalResult; finishNowScreen.ModalResultCookie = modalResultCookie; finishNowScreen.crystals = crystalCost; finishNowScreen.titleOverride = title; finishNowScreen.messageOverride = message; finishNowScreen.IsAlwaysOnTop = alwaysOnTop; Service.ScreenController.AddScreen(finishNowScreen); return(finishNowScreen); }
private void OnFinishClicked(UXButton button) { if (this.activeContract == null) { return; } int crystalCostToFinishContract = ContractUtils.GetCrystalCostToFinishContract(this.activeContract); if (crystalCostToFinishContract >= GameConstants.CRYSTAL_SPEND_WARNING_MINIMUM) { FinishNowScreen.ShowModal(this.selectedBuilding, new OnScreenModalResult(this.FinishContract), null); } else { this.FinishContract(this.selectedBuilding, null); } }
protected virtual void OnInstantUpgradeButtonClicked(UXButton button) { if (!this.HasEnoughResourceCapacityToUpgrade(this.nextBuildingInfo)) { CurrencyType currencyType = GameUtils.GetCurrencyType(this.nextBuildingInfo.UpgradeCredits, this.nextBuildingInfo.UpgradeMaterials, this.nextBuildingInfo.UpgradeContraband); Service.ICurrencyController.HandleUnableToCollect(currencyType); return; } int num = GameUtils.CrystalCostToInstantUpgrade(this.nextBuildingInfo); if (num >= GameConstants.CRYSTAL_SPEND_WARNING_MINIMUM) { FinishNowScreen.ShowModalWithNoContract(this.selectedBuilding, new OnScreenModalResult(this.ConfirmInstantUpgrade), null, num); return; } this.ConfirmInstantUpgrade(true, null); }
protected override void OnInstantUpgradeButtonClicked(UXButton button) { if (!base.HasEnoughResourceCapacityToUpgrade(this.nextBuildingInfo)) { CurrencyType currencyType = GameUtils.GetCurrencyType(this.nextBuildingInfo.UpgradeCredits, this.nextBuildingInfo.UpgradeMaterials, this.nextBuildingInfo.UpgradeContraband); Service.ICurrencyController.HandleUnableToCollect(currencyType); return; } int num = GameUtils.CrystalCostToInstantUpgrade(this.nextBuildingInfo); string planetDisplayName = LangUtils.GetPlanetDisplayName(this.selectedPlanet); string text = this.lang.ThousandsSeparated(num); FinishNowScreen finishNowScreen = FinishNowScreen.ShowModalWithNoContract(this.selectedBuilding, new OnScreenModalResult(base.ConfirmInstantUpgrade), null, num, this.lang.Get("PLANETS_GNC_UNLOCK_MODAL_TITLE", new object[0]), this.lang.Get("PLANETS_GNC_INSTANT_MODAL_DESC", new object[] { text, planetDisplayName }), true); finishNowScreen.SetTextureInset("PlanetEnvIcon-" + this.selectedPlanet.Abbreviation); }
public unsafe static long $Invoke12(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(FinishNowScreen.ShowModalWithNoContract((Entity)GCHandledObjects.GCHandleToObject(*args), (OnScreenModalResult)GCHandledObjects.GCHandleToObject(args[1]), GCHandledObjects.GCHandleToObject(args[2]), *(int *)(args + 3), Marshal.PtrToStringUni(*(IntPtr *)(args + 4)), Marshal.PtrToStringUni(*(IntPtr *)(args + 5)), *(sbyte *)(args + 6) != 0))); }
public unsafe static long $Invoke11(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(FinishNowScreen.ShowModalWithNoContract((Entity)GCHandledObjects.GCHandleToObject(*args), (OnScreenModalResult)GCHandledObjects.GCHandleToObject(args[1]), GCHandledObjects.GCHandleToObject(args[2]), *(int *)(args + 3)))); }
public unsafe static long $Invoke9(long instance, long *args) { FinishNowScreen.ShowModal((Entity)GCHandledObjects.GCHandleToObject(*args), (OnScreenModalResult)GCHandledObjects.GCHandleToObject(args[1]), GCHandledObjects.GCHandleToObject(args[2])); return(-1L); }
public unsafe static long $Invoke2(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(FinishNowScreen.CreateFinishNowScreen((Entity)GCHandledObjects.GCHandleToObject(*args), (Contract)GCHandledObjects.GCHandleToObject(args[1]), *(sbyte *)(args + 2) != 0, (OnScreenModalResult)GCHandledObjects.GCHandleToObject(args[3]), GCHandledObjects.GCHandleToObject(args[4])))); }
public unsafe static long $Invoke1(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(FinishNowScreen.CreateFinishNowPerkScreen(Marshal.PtrToStringUni(*(IntPtr *)args), (OnScreenModalResult)GCHandledObjects.GCHandleToObject(args[1]), GCHandledObjects.GCHandleToObject(args[2])))); }