예제 #1
0
        protected MenuUIManager(IMenuController menuController)
        {
            MenuRoot = UI.Root;
            MenuRoot.SetDefaultStyle(Game.PackageManager.GetXmlFile("UI/MainMenuStyle.xml", true));

            this.MenuController = menuController;

            MainMenu             = new MainMenu(this);
            OptionsScreen        = new OptionsScreen(this);
            PauseMenu            = new PauseMenu(this);
            LoadingScreen        = new LoadingScreen(this);
            SaveGameScreen       = new SaveGameScreen(this);
            LoadGameScreen       = new LoadGameScreen(this);
            PackagePickingScreen = new PackagePickingScreen(this);
            LevelPickingScreen   = new LevelPickingScreen(this);
            LevelSettingsScreen  = new LevelSettingsScreen(this);
            LevelCreationScreen  = new LevelCreationScreen(this);
            SaveAsScreen         = new SaveAsScreen(this);
            EndScreen            = new EndScreen(this);
            AboutScreen          = new AboutScreen(this);
            FileBrowsingPopUp    = new FileSystemBrowsingPopUp(this);
            ConfirmationPopUp    = new ConfirmationPopUp(this);
            ErrorPopUp           = new ErrorPopUp(this);

            PreviousScreens = new Stack <MenuScreen>();
        }
예제 #2
0
            public Screen(EndScreen proxy)
                : base(proxy)
            {
                this.proxy = proxy;
                Game.UI.LoadLayoutToElement(MenuUIManager.MenuRoot, Game.ResourceCache, "UI/EndScreenLayout.xml");

                window = (Window)MenuUIManager.MenuRoot.GetChild("EndWindow");

                heading       = (Text)window.GetChild("Heading");
                heading.Value = proxy.Victory ? "Victory" : "Defeat";

                mainMenuButton          = (Button)window.GetChild("MainMenuButton");
                mainMenuButton.Pressed += MainMenuButtonPressed;
            }