public PlayerEntryScreen(string fontName) { font = fontName; TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); entryAction = new InputAction( new Buttons[] { Buttons.A }, new Keys[] { }, true); cancelAction = new InputAction( new Buttons[] { Buttons.B, Buttons.Back }, new Keys[] { Keys.Escape }, true); offsets[0] = new Vector2(ScreenHelper.Viewport.Width / 3, ScreenHelper.Viewport.Height / 4); offsets[1] = new Vector2(2 * ScreenHelper.Viewport.Width / 3, ScreenHelper.Viewport.Height / 4); offsets[2] = new Vector2(ScreenHelper.Viewport.Width / 3, 3 * ScreenHelper.Viewport.Height / 4); offsets[3] = new Vector2(2 * ScreenHelper.Viewport.Width / 3, 3 * ScreenHelper.Viewport.Height / 4); corners[0] = new Vector2(-ScreenHelper.Viewport.Width / 20, -ScreenHelper.Viewport.Height / 20); corners[1] = new Vector2(21 * ScreenHelper.Viewport.Width / 20, -ScreenHelper.Viewport.Height / 20); corners[2] = new Vector2(-ScreenHelper.Viewport.Width / 20, 21 * ScreenHelper.Viewport.Height / 20); corners[3] = new Vector2(21 * ScreenHelper.Viewport.Width / 20, 21 * ScreenHelper.Viewport.Height / 20); }
public InitialEntryScreen(Vector2 position, GameOverScreen parent) { this.parent = parent; TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); IsPopup = true; this.position = position; up = new InputAction( new Buttons[] { Buttons.LeftThumbstickUp, Buttons.DPadUp }, new Keys[] { Keys.Up }, true); down = new InputAction( new Buttons[] { Buttons.LeftThumbstickDown, Buttons.DPadDown }, new Keys[] { Keys.Down }, true); left = new InputAction( new Buttons[] { Buttons.LeftThumbstickLeft, Buttons.DPadLeft }, new Keys[] { Keys.Left }, true); right = new InputAction( new Buttons[] { Buttons.LeftThumbstickRight, Buttons.DPadRight }, new Keys[] { Keys.Right }, true); accept = new InputAction( new Buttons[] { Buttons.Start, Buttons.A }, new Keys[] { Keys.Enter, Keys.Space }, true); }
/// <summary> /// Constructs a new menu screen with the specified title. /// </summary> public MenuScreen(string menuTitle) { this.menuTitle = menuTitle; TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); #if XBOX || WINDOWS //Define the input actions menuUp = new InputAction( new Buttons[] { Buttons.DPadUp, Buttons.LeftThumbstickUp }, new Keys[] { Keys.Up }, true); menuDown = new InputAction( new Buttons[] { Buttons.DPadDown, Buttons.LeftThumbstickDown }, new Keys[] { Keys.Down }, true); menuSelect = new InputAction( new Buttons[] { Buttons.A, Buttons.Start }, new Keys[] { Keys.Enter, Keys.Space }, true); menuCancel = new InputAction( new Buttons[] { Buttons.B, Buttons.Back }, new Keys[] { Keys.Escape }, true); #endif }
public StartScreen() : base("") { menuCancel = new InputAction(new Buttons[] { }, new Keys[] { }, true); MenuEntry enter = new MenuEntry("Press A"); enter.Selected += entry; MenuEntries.Add(enter); }
public TextScreen(string title, params string[] lines) { this.title = title; this.lines = lines; TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); menuCancel = new InputAction( new Buttons[] { Buttons.B, Buttons.Back }, new Keys[] { Keys.Escape, Keys.Space }, true); cancelSound = "MenuCancel"; }
public GameOverScreen(PlayerIndex[] players, long score, bool victory) { this.score = score; this.players = players; this.IsPopup = true; this.victory = victory; TransitionOnTime = TimeSpan.FromSeconds(0.5f); TransitionOffTime = TimeSpan.FromSeconds(0.5f); cancel = new InputAction( new Buttons[] { Buttons.Back, Buttons.A, Buttons.B }, new Keys[] { Keys.Space, Keys.Escape, Keys.Tab }, true); }
public ExitableBackgroundScreen(string filename, TransitionType type) : base(filename, type) { exit = new InputAction( new Buttons[] { Buttons.A, Buttons.B, Buttons.Back }, new Keys[] { Keys.Space, Keys.Escape }, true); }
public IntroScreen() { TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); cancel = new InputAction( new Buttons[] { Buttons.Back, Buttons.B }, new Keys[] { Keys.Escape }, true); }
/// <summary> /// Makes a new high score screen, with a set title. /// </summary> /// <param name="titleText"></param> public HighScoreScreen(int players, int selected) { needsStorage = true; this.players = players; selectedScore = selected; menuCancel = new InputAction( new Buttons[] { Buttons.B, Buttons.Back }, new Keys[] { Keys.Escape }, true); left = new InputAction( new Buttons[] { Buttons.LeftShoulder, Buttons.LeftTrigger, Buttons.LeftThumbstickLeft }, new Keys[] { Keys.Left }, true); right = new InputAction( new Buttons[] { Buttons.RightShoulder, Buttons.RightTrigger, Buttons.LeftThumbstickRight }, new Keys[] { Keys.Right }, true); TransitionOnTime = TimeSpan.FromSeconds(0.5f); TransitionOffTime = TimeSpan.FromSeconds(0.5f); }
public BossScreen(SpriteSheet sheet) { needsStorage = true; TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); spriteSheet = sheet; currentKey = bosses[0].SpriteKey; next = new InputAction( new Buttons[] { Buttons.LeftThumbstickRight, Buttons.DPadRight }, new Keys[] { Keys.Right }, true); previous = new InputAction( new Buttons[] { Buttons.LeftThumbstickLeft, Buttons.DPadLeft }, new Keys[] { Keys.Left }, true); cancel = new InputAction( new Buttons[] { Buttons.Back, Buttons.B }, new Keys[] { Keys.Escape }, true); }
public MainMenuScreen(string text) : this(text, false) { menuCancel = new InputAction(new Buttons[] { }, new Keys[] { }, true); }