mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-05-11 16:57:44 +02:00

* Refactor * Apply suggestions from code review Co-authored-by: Ac_K <Acoustik666@gmail.com> * Update src/Ryujinx/UI/Views/Settings/SettingsHotkeysView.axaml.cs Co-authored-by: Ac_K <Acoustik666@gmail.com> * Update src/Ryujinx.Input/ButtonValueType.cs Co-authored-by: Ac_K <Acoustik666@gmail.com> * Add empty line * Requested renames * Update src/Ryujinx/UI/Views/Settings/SettingsHotkeysView.axaml.cs Co-authored-by: gdkchan <gab.dark.100@gmail.com> * Make parent models private readonly * Fix ControllerInputView * Make line shorter * Mac keys in locale * Double line break * Fix build * Get rid of _isValid * Fix potential race condition * Rename HasAnyButtonPressed to IsAnyButtonPressed * Use switches * Simplify enumeration --------- Co-authored-by: Ac_K <Acoustik666@gmail.com> Co-authored-by: gdkchan <gab.dark.100@gmail.com> Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
109 lines
5.2 KiB
XML
109 lines
5.2 KiB
XML
<UserControl
|
|
x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsHotkeysView"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
|
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
|
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
|
mc:Ignorable="d"
|
|
x:DataType="viewModels:SettingsViewModel"
|
|
x:CompileBindings="True"
|
|
Focusable="True">
|
|
<Design.DataContext>
|
|
<viewModels:SettingsViewModel />
|
|
</Design.DataContext>
|
|
<UserControl.Resources>
|
|
<helpers:KeyValueConverter x:Key="Key" />
|
|
</UserControl.Resources>
|
|
<UserControl.Styles>
|
|
<Style Selector="StackPanel > StackPanel">
|
|
<Setter Property="Margin" Value="10, 0, 0, 0" />
|
|
<Setter Property="Orientation" Value="Horizontal" />
|
|
</Style>
|
|
<Style Selector="StackPanel > StackPanel > TextBlock">
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="Width" Value="230" />
|
|
</Style>
|
|
<Style Selector="ToggleButton">
|
|
<Setter Property="Width" Value="90" />
|
|
<Setter Property="Height" Value="27" />
|
|
</Style>
|
|
<Style Selector="ToggleButton > TextBlock">
|
|
<Setter Property="TextAlignment" Value="Center" />
|
|
</Style>
|
|
</UserControl.Styles>
|
|
<ScrollViewer
|
|
Name="HotkeysPage"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
VerticalScrollBarVisibility="Auto">
|
|
<Border Classes="settings">
|
|
<StackPanel
|
|
Name="SettingButtons"
|
|
Margin="10"
|
|
Orientation="Vertical"
|
|
Spacing="10">
|
|
<TextBlock
|
|
Classes="h1"
|
|
Text="{locale:Locale SettingsTabHotkeysHotkeys}" />
|
|
<StackPanel>
|
|
<TextBlock Text="{locale:Locale SettingsTabHotkeysToggleVsyncHotkey}" />
|
|
<ToggleButton Name="ToggleVsync">
|
|
<TextBlock Text="{Binding KeyboardHotkey.ToggleVsync, Converter={StaticResource Key}}" />
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="{locale:Locale SettingsTabHotkeysScreenshotHotkey}" />
|
|
<ToggleButton Name="Screenshot">
|
|
<TextBlock Text="{Binding KeyboardHotkey.Screenshot, Converter={StaticResource Key}}" />
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="{locale:Locale SettingsTabHotkeysShowUiHotkey}" />
|
|
<ToggleButton Name="ShowUI">
|
|
<TextBlock Text="{Binding KeyboardHotkey.ShowUI, Converter={StaticResource Key}}" />
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="{locale:Locale SettingsTabHotkeysPauseHotkey}" />
|
|
<ToggleButton Name="Pause">
|
|
<TextBlock Text="{Binding KeyboardHotkey.Pause, Converter={StaticResource Key}}" />
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="{locale:Locale SettingsTabHotkeysToggleMuteHotkey}" />
|
|
<ToggleButton Name="ToggleMute">
|
|
<TextBlock Text="{Binding KeyboardHotkey.ToggleMute, Converter={StaticResource Key}}" />
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="{locale:Locale SettingsTabHotkeysResScaleUpHotkey}" />
|
|
<ToggleButton Name="ResScaleUp">
|
|
<TextBlock Text="{Binding KeyboardHotkey.ResScaleUp, Converter={StaticResource Key}}" />
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="{locale:Locale SettingsTabHotkeysResScaleDownHotkey}" />
|
|
<ToggleButton Name="ResScaleDown">
|
|
<TextBlock Text="{Binding KeyboardHotkey.ResScaleDown, Converter={StaticResource Key}}" />
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="{locale:Locale SettingsTabHotkeysVolumeUpHotkey}" />
|
|
<ToggleButton Name="VolumeUp">
|
|
<TextBlock Text="{Binding KeyboardHotkey.VolumeUp, Converter={StaticResource Key}}" />
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<TextBlock Text="{locale:Locale SettingsTabHotkeysVolumeDownHotkey}" />
|
|
<ToggleButton Name="VolumeDown">
|
|
<TextBlock Text="{Binding KeyboardHotkey.VolumeDown, Converter={StaticResource Key}}" />
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
</ScrollViewer>
|
|
</UserControl>
|