Esempio n. 1
0
        public static ClosableScreen GetDeployableInfoParentScreen()
        {
            ScreenController screenController   = Service.ScreenController;
            ClosableScreen   highestLevelScreen = screenController.GetHighestLevelScreen <BuildingInfoScreen>();

            if (highestLevelScreen != null)
            {
                return(highestLevelScreen);
            }
            highestLevelScreen = screenController.GetHighestLevelScreen <TroopTrainingScreen>();
            if (highestLevelScreen != null)
            {
                return(highestLevelScreen);
            }
            highestLevelScreen = screenController.GetHighestLevelScreen <TroopUpgradeScreen>();
            if (highestLevelScreen != null)
            {
                return(highestLevelScreen);
            }
            highestLevelScreen = screenController.GetHighestLevelScreen <PrizeInventoryScreen>();
            if (highestLevelScreen != null)
            {
                return(highestLevelScreen);
            }
            return(null);
        }
Esempio n. 2
0
        private void ToggleParentScreenVisibility(bool visible)
        {
            ClosableScreen deployableInfoParentScreen = ScreenUtils.GetDeployableInfoParentScreen();

            if (deployableInfoParentScreen != null)
            {
                deployableInfoParentScreen.Visible = visible;
            }
        }
Esempio n. 3
0
 public override void Close(object modalResult)
 {
     if (this.shouldCloseParent)
     {
         this.wantsTransition = true;
         ClosableScreen highestLevelScreen = Service.ScreenController.GetHighestLevelScreen <ArmoryScreen>();
         if (highestLevelScreen == null)
         {
             highestLevelScreen = Service.ScreenController.GetHighestLevelScreen <TroopUpgradeScreen>();
         }
         if (highestLevelScreen != null)
         {
             highestLevelScreen.Close(null);
         }
     }
     base.Close(modalResult);
 }