Ejemplo n.º 1
0
        public void Update(ListPage page)
        {
            if (CompareF.RectangleVsVector2(Boundary, MouseInput.MouseRealPosMenu()) == true)
            {
                if (_state != ListItemStatesEnum.selected)
                {
                    _state = ListItemStatesEnum.hover;
                }
                if (MouseInput.MouseStateNew.LeftButton == ButtonState.Released && MouseInput.MouseStateOld.LeftButton == ButtonState.Pressed)
                {
                    page.CloseOthers(this);
                    _state = ListItemStatesEnum.selected;
                }
            }
            else
            {
                if (_state != ListItemStatesEnum.selected)
                {
                    _state = ListItemStatesEnum.none;
                }
            }

            if (_state == ListItemStatesEnum.selected)
            {
                foreach (Keys key in Enum.GetValues(typeof(Keys)))
                {
                    if (KeyboardInput.KeyboardStateNew.IsKeyDown(key))
                    {
                        Game1.STP.ControlKeys[_key] = key;
                        _state = ListItemStatesEnum.none;
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public void onBack()
 {
     list.CloseOthers(null);
     Game1.STP.Save();
 }