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); }
private void InputDetectorViewZoom_ControlsChanged(InputControl2.ControlsChangedEventArgs args) { _tempViewZoomConfig = BuildNewControlConfig(args); }
private void InputDetectorSelectSprite_ControlsChanged(InputControl2.ControlsChangedEventArgs args) { _tempSpriteSelectConfig = BuildNewControlConfig(args); }
private void InputDetectorMoveCamera_ControlsChanged(InputControl2.ControlsChangedEventArgs args) { _tempCameraDragConfig = BuildNewControlConfig(args); }