private Vector2 _pos; // position of the component's background texture in menu system coordinates

        #endregion Fields

        #region Constructors

        public MainMenuComponent(MenuEngineImpl menuEngine)
            : base(menuEngine)
        {
            _pos = new Vector2(0, 698);
            _currentItemsHistory = new Stack<Tuple<MainMenuItemCollection, ScrollableList>>();
            InitializeControlCallbacks();
        }
Beispiel #2
0
 public ProgressBar(MenuEngineImpl menu)
     : base(null, HorizontalAlignment.Center, VerticalAlignment.Center)
 {
     Menu = menu;
     _lock = new object();
     IsFinished = true;
 }
 public EquipMenuComponent(MenuEngineImpl menuEngine)
     : base(menuEngine)
 {
     ListCursorFadeStartTime = MenuEngine.Game.GameTime.TotalRealTime;
     _tabFadeStartTime = MenuEngine.Game.GameTime.TotalRealTime;
     _readyFadeStartTime = MenuEngine.Game.GameTime.TotalRealTime;
     Pos = Vector2.Zero;
     ResetEquipMenu();
 }
 public ControlSelectionOverlayDialogData(MenuEngineImpl menu, string text, Action<IControlType> returnControl)
     : base(menu, text)
 {
     _returnControl = returnControl;
     _keysDownSinceEntry = new List<Keys>(Keyboard.GetState().GetPressedKeys());
     _gamePadButtonsDownsinceEntry =
         (from gamePad in Enumerable.Range(0, 4)
         from button in Enum.GetValues(typeof(GamePadButtonType)).Cast<GamePadButtonType>()
         let buttonControlType = new GamePadButtonControlType(gamePad, button)
         where buttonControlType.GetControl().Pulse
         select buttonControlType).ToList();
 }
        private Vector2 _pos; // position of the component's background texture in menu system coordinates

        #endregion Fields

        #region Constructors

        public ArenaMenuComponent(MenuEngineImpl menuEngine)
            : base(menuEngine)
        {
            _pos = new Vector2(1220, 698);
            _cursorFade = new Curve();
            _cursorFade.Keys.Add(new CurveKey(0, 1, 0, 0, CurveContinuity.Step));
            _cursorFade.Keys.Add(new CurveKey(0.5f, 0, 0, 0, CurveContinuity.Step));
            _cursorFade.Keys.Add(new CurveKey(1, 1, 0, 0, CurveContinuity.Step));
            _cursorFade.PreLoop = CurveLoopType.Cycle;
            _cursorFade.PostLoop = CurveLoopType.Cycle;
            _currentArena = new ScrollableList(MENU_ITEM_COUNT, () => ArenaInfos.Length);
            InitializeControlCallbacks();
        }
 public UserControlledLogic(AssaultWing game)
     : base(game)
 {
     StartupScreen = new StartupScreen(Game, -1);
     MenuEngine = new MenuEngineImpl(Game, 10);
     IntroEngine = new IntroEngine(Game, 11);
     PlayerChat = new PlayerChat(Game, 12);
     OverlayDialog = new OverlayDialog(Game, 20);
     Game.Components.Add(StartupScreen);
     Game.Components.Add(MenuEngine);
     Game.Components.Add(IntroEngine);
     Game.Components.Add(PlayerChat);
     Game.Components.Add(OverlayDialog);
     CreateCustomControls(Game);
     Game.MessageHandlers.GameServerConnectionClosing += Handle_GameServerConnectionClosing;
 }
 /// <summary>
 /// Creates contents for an overlay dialog displaying arena over.
 /// </summary>
 /// <param name="text">The text to display in the dialog.</param>
 /// <param name="actions">The actions to allow in the dialog.</param>
 public CustomOverlayDialogData(MenuEngineImpl menu, string text, params TriggeredCallback[] actions)
     : base(menu, actions)
 {
     _text = text;
 }
 public DummyMenuComponent(MenuEngineImpl menuEngine)
     : base(menuEngine)
 {
 }
 public OverlayDialogData(MenuEngineImpl menu, params TriggeredCallback[] actions)
     : base(null, HorizontalAlignment.Stretch, VerticalAlignment.Stretch)
 {
     Menu = menu;
     _actions = actions;
 }
Beispiel #10
0
 /// <summary>
 /// Creates a new menu component for a menu system.
 /// </summary>
 /// <param name="menuEngine">The menu system.</param>
 public MenuComponent(MenuEngineImpl menuEngine)
 {
     MenuEngine = menuEngine;
 }
 public GameOverOverlayDialogData(MenuEngineImpl menu, Standings standings, params TriggeredCallback[] actions)
     : base(menu, actions)
 {
     _standings = standings;
 }