Beispiel #1
0
        public OptionsScene(Game game)
            : base(game)
        {
            var keyboard = new KeyboardInputLayer(this, null);
            keyboard.AddKeyDownBinding(Keys.Escape, () => Game.PopScene());

            Components.Add(keyboard);

            var menuDialog = new MenuDialog();
            menuDialog.OnReturnPressed += () => Game.PopScene();
            menuDialog.OnExitPressed += () => Game.Exit();
            menuDialog.OnMainMenuPressed += () => ((SRPGGame)Game).ReturnToMainMenu();

            Gui.Screen.Desktop.Children.Add(menuDialog);
            Gui.Visualizer = FlatGuiVisualizer.FromFile(Game.Services, "Content/Gui/main_gui.xml");
        }
Beispiel #2
0
        public OptionsScene(Game game) : base(game)
        {
            var keyboard = new KeyboardInputLayer(this, null);

            keyboard.AddKeyDownBinding(Keys.Escape, () => Game.PopScene());

            Components.Add(keyboard);

            var menuDialog = new MenuDialog();

            menuDialog.OnReturnPressed   += () => Game.PopScene();
            menuDialog.OnExitPressed     += () => Game.Exit();
            menuDialog.OnMainMenuPressed += () => ((SRPGGame)Game).ReturnToMainMenu();

            Gui.Screen.Desktop.Children.Add(menuDialog);
            Gui.Visualizer = FlatGuiVisualizer.FromFile(Game.Services, "Content/Gui/main_gui.xml");
        }