public PauseScreen(ScreenManager screenManager) : base(screenManager, new String[] { "Continue", "Save", "Save And Exit" }, new Action[] { MenuItemFunctions.BackToGame, MenuItemFunctions.Save, MenuItemFunctions.MainMenu }) { escPressed = false; paused = false; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (ScreenManager game = new ScreenManager()) { game.Run(); } }
public InputScreen(ScreenManager sm) : base(sm, "Input", "", new string[] { "Enter", "Back" }, new Action[] { MenuItemFunctions.ReturnInput, MenuItemFunctions.MainMenu }) { input = ""; oldPressedKeys = new List<Keys>(); oldKb = Keyboard.GetState(); // cursorTime > CURSOR_TIME show, else don't show cursorTime = CURSOR_TIME; }
public InventoryScreen(ScreenManager sm) : base(sm, "Status", "", new string[] { "Back" }, new Action[] { MenuItemFunctions.BackToGame }) { buttonPressed = false; itemBlocks = new ItemBlock[] { new ItemBlock(0), new ItemBlock(1), new ItemBlock(2), new ItemBlock(3), new ItemBlock(4), new ItemBlock(5), new ItemBlock(6), new ItemBlock(7), new ItemBlock(8), new ItemBlock(9), new ItemBlock(10), new ItemBlock(11) }; oldMouse = Mouse.GetState(); helmRect = new Rectangle(100, 52, 155, 16); bodyRect = new Rectangle(100, 76, 155, 16); legsRect = new Rectangle(100, 100, 155, 16); }
public MenuScreen(ScreenManager sm ,String[] items, Action[] funcs) : base(sm) { menuItems = new List<MenuItem>(); curSelection = 0; // Default if (items == null) items = new string[] { "Back" }; if (funcs == null) funcs = new Action[] { MenuItemFunctions.BackToGame }; for (int i = 0; i < items.GetLength(0); i++) menuItems.Add(new MenuItem(this, items[i], funcs[i], MenuItem.MenuItemAlignment.Center)); if (menuItems.Count == 0) { Console.WriteLine("Tried to make a menu screen with no items!"); Environment.Exit(1); } }
public GameScreen(ScreenManager screenManager) : base(screenManager) { offset = new Vector2(0, 0); oldKb = Keyboard.GetState(); }
public Screen(ScreenManager screenManager) { this.screenManager = screenManager; DoDraw = DoUpdate = true; }
public PopUpScreen(ScreenManager sm, string title, string text = "", string[] items = null, Action[] funcs = null) : base(sm, items, funcs) { Text = text; Title = title; }
public MainMenuHelpScreen(ScreenManager sm) : base(sm, new string[] { "Back" }, new Action[] { MenuItemFunctions.MainMenu }) { }
public MainMenuScreen(ScreenManager screenManager) : base(screenManager, new String[] { "Play", "Load", "Help", "Exit" }, new Action[] { MenuItemFunctions.Play, MenuItemFunctions.Load, MenuItemFunctions.MainMenuHelp, MenuItemFunctions.Exit }) { }