Update TurboWhileHeld hotkey to refactored Input

This commit is contained in:
unknown 2024-06-03 00:10:31 -03:00
parent c5eecc320c
commit 784f75e665
2 changed files with 16 additions and 3 deletions

View File

@ -115,6 +115,17 @@ namespace Ryujinx.Ava.UI.Models.Input
}
}
private bool _turboWhileHeld;
public bool TurboWhileHeld
{
get => _turboWhileHeld;
set
{
_turboWhileHeld = value;
OnPropertyChanged();
}
}
public HotkeyConfig(KeyboardHotkeys config)
{
if (config != null)
@ -129,6 +140,7 @@ namespace Ryujinx.Ava.UI.Models.Input
VolumeUp = config.VolumeUp;
VolumeDown = config.VolumeDown;
ToggleTurbo = config.ToggleTurbo;
TurboWhileHeld = config.TurboWhileHeld;
}
}
@ -146,7 +158,8 @@ namespace Ryujinx.Ava.UI.Models.Input
VolumeUp = VolumeUp,
VolumeDown = VolumeDown,
ToggleTurbo = ToggleTurbo,
};
TurboWhileHeld = TurboWhileHeld,
};
return config;
}

View File

@ -107,7 +107,7 @@
<TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysToggleTurboHotkey}" Width="230" />
<ToggleButton Name="ToggleTurbo">
<TextBlock
Text="{Binding KeyboardHotkeys.ToggleTurbo, Mode=TwoWay, Converter={StaticResource Key}}"
Text="{Binding KeyboardHotkey.ToggleTurbo, Mode=TwoWay, Converter={StaticResource Key}}"
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
@ -115,7 +115,7 @@
<TextBlock Text="{locale:Locale SettingsTabHotkeysToggleTurboToggle}"
ToolTip.Tip="{locale:Locale SettingsTabHotkeysToggleTurboToggleTooltip}"
Width="230" />
<CheckBox IsChecked="{Binding KeyboardHotkeys.TurboWhileHeld}" />
<CheckBox IsChecked="{Binding KeyboardHotkey.TurboWhileHeld}" />
</StackPanel>
</StackPanel>
</Border>