Skip to content

Commit

Permalink
prep work on creating transparent radio panel toggle keybind
Browse files Browse the repository at this point in the history
  • Loading branch information
Dabble1SC committed Dec 4, 2023
1 parent 6bb0b73 commit 4bab708
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions DCS-SR-Client/Input/InputDeviceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -690,15 +690,15 @@ public void StartDetectPtt(DetectPttCallback callback)
{
//run on main
Application.Current.Dispatcher.Invoke(
() => { _toggleOverlayCallback(false, 8); });
break;
() => { _toggleOverlayCallback(false, 8); }); // Change second digit to match overlay window number you want to open
break; // TODO Replace "8" with 10T panel ID number
}
else if (bindState.IsActive && bindState.MainDevice.InputBind == InputBinding.AwacsOverlayToggle)
{
//run on main
Application.Current.Dispatcher.Invoke(
() => { _toggleOverlayCallback(false, 7); });
break;
() => { _toggleOverlayCallback(false, 7); }); // Change second digit to match overlay window number you want to open
break;
}
else if ((int)bindState.MainDevice.InputBind >= (int)InputBinding.Up100 &&
(int)bindState.MainDevice.InputBind <= (int)InputBinding.AwacsOverlayToggle)
Expand Down
4 changes: 2 additions & 2 deletions DCS-SR-Client/UI/ClientWindow/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -756,13 +756,13 @@
ControlInputBinding="{x:Static settings:InputBinding.AwacsOverlayToggle}"
Grid.ColumnSpan="5"
Grid.Row="22"
InputName="AWACS Overlay Toggle"
InputName="10 Radio Panel Toggle"
x:Name="AwacsOverlayToggle" />
<local:InputBindingControl
ControlInputBinding="{x:Static settings:InputBinding.OverlayToggle}"
Grid.ColumnSpan="5"
Grid.Row="23"
InputName="Overlay Toggle"
InputName="1 Radio Panel Toggle"
x:Name="RadioOverlay" />


Expand Down
6 changes: 4 additions & 2 deletions DCS-SR-Client/UI/ClientWindow/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,8 @@ private void InitInput()
IntercomStartTransmitEffect.SelectionChanged += OnIntercomStartTransmitEffectChanged;
IntercomEndTransmitEffect.SelectionChanged += OnIntercomEndTransmitEffectChanged;

// How to change the keybind names in the keybinds tab

Radio1.InputName = "Radio 1";
Radio1.ControlInputBinding = InputBinding.Switch1;
Radio1.InputDeviceManager = InputManager;
Expand All @@ -635,11 +637,11 @@ private void InitInput()
IntercomPTT.ControlInputBinding = InputBinding.IntercomPTT;
IntercomPTT.InputDeviceManager = InputManager;

RadioOverlay.InputName = "Overlay Toggle";
RadioOverlay.InputName = "Transparent Panel Toggle"; // TODO: Replace this with 10T panel
RadioOverlay.ControlInputBinding = InputBinding.OverlayToggle;
RadioOverlay.InputDeviceManager = InputManager;

AwacsOverlayToggle.InputName = "Awacs Toggle";
AwacsOverlayToggle.InputName = "10 Radio Panel Toggle";
AwacsOverlayToggle.ControlInputBinding = InputBinding.AwacsOverlayToggle;
AwacsOverlayToggle.InputDeviceManager = InputManager;

Expand Down

0 comments on commit 4bab708

Please sign in to comment.