예제 #1
0
        public void Refresh(IInputAdapter adapter)
        {
            _buttonStates.Clear();

            _chosen = 0;

            _buttonStates.Add(MouseButton.LeftButton, GetState(adapter, MouseButton.LeftButton));
            _buttonStates.Add(MouseButton.RightButton, GetState(adapter, MouseButton.RightButton));
            _buttonStates.Add(MouseButton.MiddleButton, GetState(adapter, MouseButton.MiddleButton));

            _screenPostion = Utils.ToWorld(adapter.MousePostion());
            _rawPostion    = adapter.MousePostion();
        }
예제 #2
0
 private void HandleCommandInput(Selector selector)
 {
     if (_inputAdapter.MouseClicked(MouseButton.RightButton))
     {
         selector.Command = new MoveCommand(_inputAdapter.MousePostion());
     }
     else if (_inputAdapter.KeyTyped(Settings.DELETE_KEY))
     {
         selector.Command = new DeleteCommand();
     }
 }