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>(); }
public Screen(SaveAsScreen proxy) : base(proxy) { this.proxy = proxy; Game.UI.LoadLayoutToElement(MenuUIManager.MenuRoot, Game.ResourceCache, "UI/SaveAsLayout.xml"); window = (Window)MenuUIManager.MenuRoot.GetChild("SaveAsWindow"); nameEdit = (LineEdit)window.GetChild("NameEdit", true); thumbnailPathButton = (Button)window.GetChild("ThumbnailPathButton", true); thumbnailPathText = new PathText((Text)thumbnailPathButton.GetChild("PathText")); descriptionEdit = (LineEdit)window.GetChild("DescriptionEdit", true); nameEdit.TextChanged += NameChanged; descriptionEdit.TextChanged += DescriptionChanged; thumbnailPathButton.Released += ThumbnailPathButtonReleased; ((Button)window.GetChild("SaveAsButton", true)).Released += SaveAsButtonReleased; ((Button)window.GetChild("BackButton", true)).Released += BackButtonReleased; nameEdit.Text = Level.LevelRep.Name; thumbnailPathText.Value = Level.LevelRep.ThumbnailPath; descriptionEdit.Text = Level.LevelRep.Description; }