private void OnRelocateClicked(UXButton button) { PlanetVO vO = this.currentPlanet.VO; Service.Get <EventManager>().SendEvent(EventId.LootTableRelocateTapped, vO.Uid); ConfirmRelocateScreen.ShowModal(vO, null, null); }
public static void ShowModal(PlanetVO planetVO, OnScreenModalResult onModalResult, object modalResultCookie) { CurrentPlayer currentPlayer = Service.Get <CurrentPlayer>(); bool flag = Service.Get <BuildingLookupController>().HasNavigationCenter(); if (planetVO == null || !planetVO.PlayerFacing || planetVO == currentPlayer.Planet || !currentPlayer.IsPlanetUnlocked(planetVO.Uid) || !flag) { return; } string text = currentPlayer.IsRelocationRequirementMet().ToString(); string cookie = string.Concat(new object[] { currentPlayer.GetRawRelocationStarsCount(), "|", text, "|", planetVO.PlanetBIName, "|", currentPlayer.Planet.PlanetBIName }); Service.Get <EventManager>().SendEvent(EventId.PlanetRelocateButtonPressed, cookie); ConfirmRelocateScreen confirmRelocateScreen = new ConfirmRelocateScreen(planetVO); confirmRelocateScreen.OnModalResult = onModalResult; confirmRelocateScreen.ModalResultCookie = modalResultCookie; confirmRelocateScreen.IsAlwaysOnTop = true; Service.Get <ScreenController>().AddScreen(confirmRelocateScreen); }
public unsafe static long $Invoke13(long instance, long *args) { ConfirmRelocateScreen.ShowModal((PlanetVO)GCHandledObjects.GCHandleToObject(*args), (OnScreenModalResult)GCHandledObjects.GCHandleToObject(args[1]), GCHandledObjects.GCHandleToObject(args[2])); return(-1L); }
protected override void RefreshScreen() { ConfirmRelocateScreen.ShowModal(this.planetVO, base.OnModalResult, base.ModalResultCookie); base.Close(null); }