コード例 #1
0
        private ControlConfig BuildNewControlConfig(InputControl2.ControlsChangedEventArgs newControlArgs)
        {
            ControlConfig newConfig = new ControlConfig();

            if (newControlArgs.NewControlKey != Keys.None)
            {
                Key?key = InputConfigurationHelper.ConvertKey(newControlArgs.NewControlKey);

                if (key != null)
                {
                    newConfig.Key = key;
                }
            }

            MouseButton button = InputConfigurationHelper.ConvertButton(newControlArgs.NewControlMouseButton);

            if (button != MouseButton.None)
            {
                newConfig.MouseButton = button;
            }

            return(newConfig);
        }
コード例 #2
0
 private void InputDetectorViewZoom_ControlsChanged(InputControl2.ControlsChangedEventArgs args)
 {
     _tempViewZoomConfig = BuildNewControlConfig(args);
 }
コード例 #3
0
 private void InputDetectorSelectSprite_ControlsChanged(InputControl2.ControlsChangedEventArgs args)
 {
     _tempSpriteSelectConfig = BuildNewControlConfig(args);
 }
コード例 #4
0
 private void InputDetectorMoveCamera_ControlsChanged(InputControl2.ControlsChangedEventArgs args)
 {
     _tempCameraDragConfig = BuildNewControlConfig(args);
 }