public Screen(LoadGameScreen proxy) : base(proxy) { this.proxy = proxy; LoadFileNames(Game.Files.SaveGameDirAbsolutePath); Game.UI.LoadLayoutToElement(MenuUIManager.MenuRoot, Game.ResourceCache, "UI/LoadLayout.xml"); Window window = (Window)MenuUIManager.MenuRoot.GetChild("LoadWindow"); LineEdit loadLineEdit = (LineEdit)window.GetChild("LoadLineEdit", true); loadButton = (Button)window.GetChild("LoadButton", true); loadButton.Pressed += LoadButton_Pressed; loadButton.Enabled = false; Button deleteButton = (Button)window.GetChild("DeleteButton", true); deleteButton.Enabled = false; ListView fileView = (ListView)window.GetChild("FileView", true); Button backButton = (Button)window.GetChild("BackButton", true); InitUIElements(window, loadLineEdit, deleteButton, backButton, fileView); }
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>(); }