Input Settings

This commit is contained in:
_Neo_ 2025-11-12 19:49:33 +02:00
parent 1baaa1c365
commit e7be3d4be6
9 changed files with 935 additions and 1315 deletions

File diff suppressed because it is too large Load diff

View file

@ -328,7 +328,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
PlayerIndexes.Add(new(PlayerIndex.Player6, LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer6]));
PlayerIndexes.Add(new(PlayerIndex.Player7, LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer7]));
PlayerIndexes.Add(new(PlayerIndex.Player8, LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer8]));
PlayerIndexes.Add(new(PlayerIndex.Handheld, LocaleManager.Instance[LocaleKeys.ControllerSettingsHandheld]));
PlayerIndexes.Add(new(PlayerIndex.Handheld, LocaleManager.Instance[LocaleKeys.Handheld]));
}
@ -508,7 +508,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
if (_playerId == PlayerIndex.Handheld)
{
Controllers.Add(new(ControllerType.Handheld, LocaleManager.Instance[LocaleKeys.ControllerSettingsControllerTypeHandheld]));
Controllers.Add(new(ControllerType.Handheld, LocaleManager.Instance[LocaleKeys.Handheld]));
Controller = 0;
}

View file

@ -45,7 +45,7 @@
BorderBrush="{DynamicResource ThemeControlBorderColor}"
BorderThickness="1"
IsVisible="{Binding IsLeft}"
MinHeight="90"
Height="90"
CornerRadius="5">
<Grid
Margin="10"
@ -106,7 +106,8 @@
BorderThickness="1"
IsVisible="{Binding IsLeft}"
Margin="0,5,0,0"
CornerRadius="5">
CornerRadius="5"
Height="375">
<StackPanel
Margin="10"
Orientation="Vertical">
@ -116,22 +117,6 @@
Text="{ext:Locale ControllerSettingsLStick}" />
<!-- Left Joystick Controller -->
<StackPanel Orientation="Vertical">
<!-- Left Joystick Button -->
<StackPanel
Orientation="Horizontal">
<TextBlock
Margin="0,0,10,0"
Width="120"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsStickButton}"
TextAlignment="Center" />
<ToggleButton Name="LeftStickButton">
<TextBlock
Text="{Binding Config.LeftStickButton, Converter={x:Static helpers:KeyValueConverter.Instance}}"
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
<!-- Left Joystick Stick -->
<StackPanel
Margin="0,4,0,4"
@ -149,8 +134,24 @@
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
<!-- Left Joystick Button -->
<StackPanel
Orientation="Horizontal">
<TextBlock
Margin="0,0,10,0"
Width="120"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsStickButton}"
TextAlignment="Center" />
<ToggleButton Name="LeftStickButton">
<TextBlock
Text="{Binding Config.LeftStickButton, Converter={x:Static helpers:KeyValueConverter.Instance}}"
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
<Separator
Margin="0,8,0,8"
Margin="0,16,0,8"
Height="1" />
<CheckBox IsChecked="{Binding Config.LeftInvertStickX}">
<TextBlock Text="{ext:Locale ControllerSettingsStickInvertXAxis}" />
@ -162,7 +163,7 @@
<TextBlock Text="{ext:Locale ControllerSettingsRotate90}" />
</CheckBox>
<Separator
Margin="0,8,0,8"
Margin="0,8,0,16"
Height="1" />
<StackPanel Orientation="Vertical">
<TextBlock
@ -173,7 +174,7 @@
VerticalAlignment="Center"
Orientation="Horizontal">
<controls:SliderScroll
Width="130"
Width="120"
Maximum="1"
TickFrequency="0.01"
IsSnapToTickEnabled="True"
@ -182,8 +183,10 @@
Value="{Binding Config.DeadzoneLeft, Mode=TwoWay}" />
<TextBlock
VerticalAlignment="Center"
HorizontalAlignment="Center"
Width="25"
Text="{Binding Config.DeadzoneLeft, StringFormat=\{0:0.00\}}" />
Text="{Binding Config.DeadzoneLeft, StringFormat=\{0:0.00\}}"
Margin="5,0,5,1" />
</StackPanel>
<TextBlock
HorizontalAlignment="Center"
@ -193,7 +196,7 @@
VerticalAlignment="Center"
Orientation="Horizontal">
<controls:SliderScroll
Width="130"
Width="120"
Maximum="2"
TickFrequency="0.01"
IsSnapToTickEnabled="True"
@ -202,8 +205,10 @@
Value="{Binding Config.RangeLeft, Mode=TwoWay}" />
<TextBlock
VerticalAlignment="Center"
HorizontalAlignment="Center"
Width="25"
Text="{Binding Config.RangeLeft, StringFormat=\{0:0.00\}}" />
Text="{Binding Config.RangeLeft, StringFormat=\{0:0.00\}}"
Margin="5,0,5,1" />
</StackPanel>
</StackPanel>
</StackPanel>
@ -216,7 +221,8 @@
VerticalAlignment="Top"
IsVisible="{Binding IsLeft}"
Margin="0,5,0,0"
CornerRadius="5">
CornerRadius="5"
Height="170">
<StackPanel
Margin="10"
Orientation="Vertical">
@ -307,17 +313,17 @@
BorderBrush="{DynamicResource ThemeControlBorderColor}"
BorderThickness="1"
CornerRadius="5"
Margin="0,0, 0, 5"
MinHeight="90">
Margin="0,0,0,5"
Height="470">
<StackPanel Orientation="Vertical">
<Image
Margin="5,10"
MaxHeight="300"
Margin="5,10,5,10"
MaxHeight="325"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Source="{Binding Image}" />
<StackPanel
Margin="10"
Margin="5,5,5,11"
Orientation="Horizontal"
Spacing="20"
HorizontalAlignment="Center">
@ -395,39 +401,67 @@
<Border
BorderBrush="{DynamicResource ThemeControlBorderColor}"
BorderThickness="1"
CornerRadius="5">
<StackPanel
Margin="8"
Orientation="Vertical">
<TextBlock
HorizontalAlignment="Center"
Text="{ext:Locale ControllerSettingsTriggerThreshold}" />
<StackPanel
HorizontalAlignment="Center"
Orientation="Horizontal">
<controls:SliderScroll
Width="130"
Maximum="1"
TickFrequency="0.01"
IsSnapToTickEnabled="True"
SmallChange="0.01"
Minimum="0"
Value="{Binding Config.TriggerThreshold, Mode=TwoWay}" />
<TextBlock
Width="25"
Text="{Binding Config.TriggerThreshold, StringFormat=\{0:0.00\}}" />
</StackPanel>
<StackPanel
Orientation="Vertical"
IsVisible="{Binding HasSides}">
CornerRadius="5"
Height="80">
<StackPanel
Margin="10,10,10,0"
Spacing="50"
Orientation="Horizontal"
VerticalAlignment="Center"
HorizontalAlignment="Center">
<StackPanel Orientation="Vertical">
<TextBlock
VerticalAlignment="Center"
HorizontalAlignment="Center"
Text="{ext:Locale ControllerSettingsTriggerThreshold}" />
<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<controls:SliderScroll
Width="130"
Maximum="1"
TickFrequency="0.01"
IsSnapToTickEnabled="True"
SmallChange="0.01"
Minimum="0"
Value="{Binding Config.TriggerThreshold, Mode=TwoWay}" />
<TextBlock
Margin="5,0,5,1"
Width="25"
Text="{Binding Config.TriggerThreshold, StringFormat=\{0:0.00\}}" />
</StackPanel>
</StackPanel>
<StackPanel
Orientation="Horizontal"
IsVisible="{Binding HasSides}">
<StackPanel
Margin="0,0,10,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsVisible="{Binding IsLeft}"
Orientation="Horizontal">
<TextBlock
Width="20"
Margin="0,0,5,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsLeftSL}"
TextAlignment="Center" />
<ToggleButton Name="LeftButtonSl">
<TextBlock
Text="{Binding Config.LeftButtonSl, Converter={x:Static helpers:KeyValueConverter.Instance}}"
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
<StackPanel
Margin="0,4,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsVisible="{Binding IsLeft}"
Orientation="Horizontal">
<TextBlock
Width="20"
Margin="0,0,5,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsLeftSR}"
@ -439,49 +473,14 @@
</ToggleButton>
</StackPanel>
<StackPanel
Margin="0,4,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsVisible="{Binding IsLeft}"
Orientation="Horizontal">
<TextBlock
Width="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsLeftSL}"
TextAlignment="Center" />
<ToggleButton Name="LeftButtonSl">
<TextBlock
Text="{Binding Config.LeftButtonSl, Converter={x:Static helpers:KeyValueConverter.Instance}}"
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
<StackPanel
Margin="0,4,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsVisible="{Binding IsRight}"
Orientation="Horizontal">
<TextBlock
Width="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsRightSR}"
TextAlignment="Center" />
<ToggleButton Name="RightButtonSr">
<TextBlock
Text="{Binding Config.RightButtonSr, Converter={x:Static helpers:KeyValueConverter.Instance}}"
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
<StackPanel
Margin="0,4,0,0"
Margin="0,0,10,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsVisible="{Binding IsRight}"
Orientation="Horizontal">
<TextBlock
Width="20"
Margin="0,0,5,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsRightSL}"
@ -492,6 +491,24 @@
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsVisible="{Binding IsRight}"
Orientation="Horizontal">
<TextBlock
Width="20"
Margin="0,0,5,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsRightSR}"
TextAlignment="Center" />
<ToggleButton Name="RightButtonSr">
<TextBlock
Text="{Binding Config.RightButtonSr, Converter={x:Static helpers:KeyValueConverter.Instance}}"
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
</StackPanel>
</StackPanel>
</Border>
@ -506,7 +523,8 @@
BorderThickness="1"
CornerRadius="5"
VerticalAlignment="Bottom"
HorizontalAlignment="Stretch">
HorizontalAlignment="Stretch"
Height="85">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<StackPanel Orientation="Vertical" Spacing="5">
<CheckBox
@ -536,7 +554,7 @@
</Button>
</StackPanel>
<controls:MiniVerticalSeparator Height="64" IsVisible="{Binding ParentModel.HasLed}"/>
<StackPanel Orientation="Vertical" Spacing="5">
<StackPanel Orientation="Vertical" Spacing="5" IsVisible="{Binding ParentModel.HasLed}">
<CheckBox
Margin="10, 10, 10, 0"
MinWidth="0"
@ -563,7 +581,7 @@
BorderBrush="{DynamicResource ThemeControlBorderColor}"
BorderThickness="1"
IsVisible="{Binding IsRight}"
MinHeight="90"
Height="90"
CornerRadius="5">
<Grid
Margin="10"
@ -628,7 +646,8 @@
BorderThickness="1"
IsVisible="{Binding IsRight}"
Margin="0,5,0,0"
CornerRadius="5">
CornerRadius="5"
Height="170">
<StackPanel
Margin="10"
Orientation="Vertical">
@ -716,7 +735,8 @@
BorderThickness="1"
CornerRadius="5"
IsVisible="{Binding IsRight}"
Margin="0,5,0,0">
Margin="0,5,0,0"
Height="375">
<StackPanel Orientation="Vertical">
<TextBlock
Margin="0,0,0,10"
@ -724,22 +744,6 @@
Text="{ext:Locale ControllerSettingsRStick}" />
<!-- Right Joystick Controller -->
<StackPanel Orientation="Vertical">
<!-- Right Joystick Button -->
<StackPanel
Orientation="Horizontal">
<TextBlock
Margin="0,0,10,0"
Width="120"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsStickButton}"
TextAlignment="Center" />
<ToggleButton Name="RightStickButton">
<TextBlock
Text="{Binding Config.RightStickButton, Converter={x:Static helpers:KeyValueConverter.Instance}}"
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
<!-- Right Joystick Stick -->
<StackPanel
Margin="0,4,0,4"
@ -758,7 +762,23 @@
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
<Separator Margin="0,8,0,8" Height="1" />
<!-- Right Joystick Button -->
<StackPanel
Orientation="Horizontal">
<TextBlock
Margin="0,0,10,0"
Width="120"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsStickButton}"
TextAlignment="Center" />
<ToggleButton Name="RightStickButton">
<TextBlock
Text="{Binding Config.RightStickButton, Converter={x:Static helpers:KeyValueConverter.Instance}}"
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
<Separator Margin="0,16,0,8" Height="1" />
<CheckBox IsChecked="{Binding Config.RightInvertStickX}">
<TextBlock Text="{ext:Locale ControllerSettingsStickInvertXAxis}" />
</CheckBox>
@ -768,7 +788,7 @@
<CheckBox IsChecked="{Binding Config.RightRotate90}">
<TextBlock Text="{ext:Locale ControllerSettingsRotate90}" />
</CheckBox>
<Separator Margin="0,8,0,8" Height="1" />
<Separator Margin="0,8,0,16" Height="1" />
<StackPanel Orientation="Vertical">
<TextBlock
HorizontalAlignment="Center"
@ -778,7 +798,7 @@
VerticalAlignment="Center"
Orientation="Horizontal">
<controls:SliderScroll
Width="130"
Width="120"
Maximum="1"
TickFrequency="0.01"
IsSnapToTickEnabled="True"
@ -789,8 +809,10 @@
Value="{Binding Config.DeadzoneRight, Mode=TwoWay}" />
<TextBlock
VerticalAlignment="Center"
HorizontalAlignment="Center"
Width="25"
Text="{Binding Config.DeadzoneRight, StringFormat=\{0:0.00\}}" />
Text="{Binding Config.DeadzoneRight, StringFormat=\{0:0.00\}}"
Margin="5,0,5,1" />
</StackPanel>
<TextBlock
HorizontalAlignment="Center"
@ -800,7 +822,7 @@
VerticalAlignment="Center"
Orientation="Horizontal">
<controls:SliderScroll
Width="130"
Width="120"
Maximum="2"
TickFrequency="0.01"
IsSnapToTickEnabled="True"
@ -809,8 +831,10 @@
Value="{Binding Config.RangeRight, Mode=TwoWay}" />
<TextBlock
VerticalAlignment="Center"
HorizontalAlignment="Center"
Width="25"
Text="{Binding Config.RangeRight, StringFormat=\{0:0.00\}}" />
Text="{Binding Config.RangeRight, StringFormat=\{0:0.00\}}"
Margin="5,0,5,1" />
</StackPanel>
</StackPanel>
</StackPanel>

View file

@ -20,217 +20,70 @@
<Design.DataContext>
<viewModels:InputViewModel />
</Design.DataContext>
<UserControl.Styles>
<Style Selector="ToggleButton">
<Setter Property="Width" Value="90" />
<Setter Property="Height" Value="27" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
</Style>
</UserControl.Styles>
<StackPanel
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Orientation="Vertical">
<StackPanel
Margin="0 0 0 5"
Orientation="Vertical"
Spacing="5">
<Grid ColumnDefinitions="*,10,*">
<!-- Player Selection -->
<Grid
Grid.Column="0"
Margin="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Center" ColumnDefinitions="Auto,*,Auto">
<StackPanel
Orientation="Vertical"
Margin="5,0,10,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Width="90">
<TextBlock
Text="{ext:Locale ControllerSettingsPlayer}" />
<TextBlock
Classes="pending"
Text ="{ext:Locale ControllerSettingsModifiedNotification}"
IsVisible="{Binding IsModified}"/>
</StackPanel>
<ComboBox
Grid.Column="1"
Name="PlayerIndexBox"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
SelectionChanged="PlayerIndexBox_OnSelectionChanged"
ItemsSource="{Binding PlayerIndexes}"
SelectedIndex="{Binding PlayerId}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Button
Grid.Column="2"
MinWidth="0"
Margin="5,0,0,0"
VerticalAlignment="Center"
ToolTip.Tip="{ext:Locale ControllerSettingsCancelCurrentChangesToolTip}"
Command="{Binding RevertChanges}">
<ui:SymbolIcon
Symbol="Undo"
FontSize="15"
Height="20" />
</Button>
</Grid>
<!-- Profile Selection -->
<Grid
Grid.Column="2"
Margin="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Center" ColumnDefinitions="Auto,*,Auto,Auto,Auto">
<TextBlock
Margin="5,0,10,0"
Width="90"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsProfile}" />
<ui:FAComboBox
Grid.Column="1"
IsEditable="True"
Name="ProfileBox"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
SelectedItem="{Binding ChosenProfile, Mode=TwoWay}"
SelectionChanged="ComboBox_SelectionChanged"
ItemsSource="{Binding ProfilesList}"
Text="{Binding ProfileName, Mode=TwoWay}" />
<Button
Grid.Column="2"
MinWidth="0"
Margin="5,0,0,0"
VerticalAlignment="Center"
ToolTip.Tip="{ext:Locale ControllerSettingsLoadProfileToolTip}"
Command="{Binding LoadProfileButton}">
<ui:SymbolIcon
Symbol="View"
FontSize="15"
Height="20" />
</Button>
<Button
Grid.Column="3"
MinWidth="0"
Margin="5,0,0,0"
VerticalAlignment="Center"
ToolTip.Tip="{ext:Locale ControllerSettingsSaveProfileToolTip}"
Command="{Binding SaveProfile}">
<ui:SymbolIcon
Symbol="Save"
FontSize="15"
Height="20" />
</Button>
<Button
Grid.Column="4"
MinWidth="0"
Margin="5,0,0,0"
VerticalAlignment="Center"
ToolTip.Tip="{ext:Locale ControllerSettingsRemoveProfileToolTip}"
Command="{Binding RemoveProfile}">
<ui:SymbolIcon
Symbol="Delete"
FontSize="15"
Height="20" />
</Button>
</Grid>
<Grid ColumnDefinitions="Auto,1.65*,Auto,1.5*" Margin="0,0,0,15">
<Grid Grid.Column="0" Margin="0,2,10,2" HorizontalAlignment="Stretch" VerticalAlignment="Center" ColumnDefinitions="Auto,*,Auto">
<ComboBox Grid.Column="1" Name="PlayerIndexBox" HorizontalAlignment="Stretch" VerticalAlignment="Center" SelectionChanged="PlayerIndexBox_OnSelectionChanged" ItemsSource="{Binding PlayerIndexes}" SelectedIndex="{Binding PlayerId}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Button Grid.Column="2" MinWidth="0" Margin="5,0,0,0" VerticalAlignment="Center" ToolTip.Tip="{ext:Locale ControllerSettingsCancelCurrentChangesToolTip}" Command="{Binding RevertChanges}">
<ui:SymbolIcon Symbol="Undo" FontSize="15" Height="20" />
</Button>
</Grid>
<Separator />
<Grid ColumnDefinitions="*,10,*">
<!-- Input Device -->
<Grid
Grid.Column="0"
Margin="2"
HorizontalAlignment="Stretch" ColumnDefinitions="Auto,*,Auto">
<TextBlock
Grid.Column="0"
Margin="5,0,10,0"
Width="90"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsInputDevice}" />
<ComboBox
Grid.Column="1"
Name="DeviceBox"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
ItemsSource="{Binding DeviceList}"
SelectedIndex="{Binding Device}" />
<Button
Grid.Column="2"
MinWidth="0"
Margin="5,0,0,0"
VerticalAlignment="Center"
Command="{Binding LoadDevice}">
<ui:SymbolIcon
Symbol="Refresh"
FontSize="15"
Height="20"/>
</Button>
</Grid>
<!-- Controller Type -->
<Grid
Grid.Column="2"
Margin="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Center" ColumnDefinitions="Auto,*">
<TextBlock
Margin="5,0,10,0"
Width="90"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsControllerType}" />
<ComboBox
Grid.Column="1"
HorizontalAlignment="Stretch"
ItemsSource="{Binding Controllers}"
SelectedIndex="{Binding Controller}">
<ComboBox.ItemTemplate>
<DataTemplate DataType="models:ControllerModel">
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<Grid Grid.Column="1" Margin="10,2,10,2" HorizontalAlignment="Stretch" VerticalAlignment="Center" ColumnDefinitions="Auto,*,Auto">
<ComboBox Grid.Column="1" Name="DeviceBox" HorizontalAlignment="Stretch" VerticalAlignment="Center" ItemsSource="{Binding DeviceList}" SelectedIndex="{Binding Device}" />
<Button Grid.Column="2" MinWidth="0" Margin="5,0,0,0" VerticalAlignment="Center" Command="{Binding LoadDevice}">
<ui:SymbolIcon Symbol="Refresh" FontSize="15" Height="20"/>
</Button>
</Grid>
</StackPanel>
<Grid Grid.Column="2" Margin="10,2,10,2" HorizontalAlignment="Stretch" VerticalAlignment="Center" ColumnDefinitions="Auto,*">
<ComboBox Grid.Column="1" HorizontalAlignment="Stretch" ItemsSource="{Binding Controllers}" SelectedIndex="{Binding Controller}">
<ComboBox.ItemTemplate>
<DataTemplate DataType="models:ControllerModel">
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<Grid Grid.Column="3" Margin="10,2,0,2" HorizontalAlignment="Stretch" VerticalAlignment="Center" ColumnDefinitions="Auto,*,Auto,Auto,Auto">
<ui:FAComboBox Grid.Column="1" IsEditable="True" Name="ProfileBox" HorizontalAlignment="Stretch" VerticalAlignment="Center" SelectedItem="{Binding ChosenProfile, Mode=TwoWay}" SelectionChanged="ComboBox_SelectionChanged" ItemsSource="{Binding ProfilesList}" Text="{Binding ProfileName, Mode=TwoWay}" />
<Button Grid.Column="2" MinWidth="0" Margin="5,0,0,0" VerticalAlignment="Center" ToolTip.Tip="{ext:Locale ControllerSettingsLoadProfileToolTip}" Command="{Binding LoadProfileButton}">
<ui:SymbolIcon Symbol="View" FontSize="15" Height="20" />
</Button>
<Button Grid.Column="3" MinWidth="0" Margin="5,0,0,0" VerticalAlignment="Center" ToolTip.Tip="{ext:Locale ControllerSettingsSaveProfileToolTip}" Command="{Binding SaveProfile}">
<ui:SymbolIcon Symbol="Save" FontSize="15" Height="20" />
</Button>
<Button Grid.Column="4" MinWidth="0" Margin="5,0,0,0" VerticalAlignment="Center" ToolTip.Tip="{ext:Locale ControllerSettingsRemoveProfileToolTip}" Command="{Binding RemoveProfile}">
<ui:SymbolIcon Symbol="Delete" FontSize="15" Height="20" />
</Button>
</Grid>
</Grid>
<ContentControl IsVisible="{Binding NotificationIsVisible}">
<ContentControl.Content>
<StackPanel>
<TextBlock
Margin="5,20,0,0"
Text="{Binding NotificationText}" />
<Button
MinWidth="0"
Width="90"
Height="27"
Margin="0,10,0,0"
VerticalAlignment="Center"
Command="{Binding UnlinkDevice}">
<TextBlock
Text="{ext:Locale ControllerSettingsUnlink}"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
<TextBlock Margin="5,20,0,0" Text="{Binding NotificationText}" />
<Button MinWidth="0" Width="90" Height="27" Margin="0,10,0,0" VerticalAlignment="Center" Command="{Binding UnlinkDevice}">
<TextBlock Text="{ext:Locale ControllerSettingsUnlink}" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
</StackPanel>
</ContentControl.Content>
</ContentControl>
<ContentControl Content="{Binding ConfigViewModel}" IsVisible="{Binding ShowSettings}">
<ContentControl.DataTemplates>
<DataTemplate DataType="viewModels:ControllerInputViewModel">
<views:ControllerInputView />
</DataTemplate>
<DataTemplate DataType="viewModels:KeyboardInputViewModel">
<views:KeyboardInputView />
</DataTemplate>
</ContentControl.DataTemplates>
</ContentControl>
<ContentControl Content="{Binding ConfigViewModel}" IsVisible="{Binding ShowSettings}">
<ContentControl.DataTemplates>
<DataTemplate DataType="viewModels:ControllerInputViewModel">
<views:ControllerInputView />
</DataTemplate>
<DataTemplate DataType="viewModels:KeyboardInputViewModel">
<views:KeyboardInputView />
</DataTemplate>
</ContentControl.DataTemplates>
</ContentControl>
</StackPanel>
</UserControl>

View file

@ -9,46 +9,37 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:DataType="viewModels:LedInputViewModel"
x:Class="Ryujinx.UI.Views.Input.LedInputView">
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal" IsVisible="{Binding ParentModel.CanClearLed}">
<TextBlock MinWidth="75" MaxWidth="200" Text="{ext:Locale ControllerSettingsLedColorDisable}" />
<CheckBox
Margin="5"
MinWidth="0"
IsChecked="{Binding TurnOffLed, Mode=TwoWay}"
Command="{Binding LedDisabledChanged}">
</CheckBox>
</StackPanel>
<StackPanel Margin="10" Orientation="Vertical" HorizontalAlignment="Center">
<CheckBox
Margin="0,0,0,2.5"
IsChecked="{Binding TurnOffLed, Mode=TwoWay}"
Command="{Binding LedDisabledChanged}"
IsVisible="{Binding ParentModel.CanClearLed}">
<TextBlock Text="{ext:Locale ControllerSettingsLedColorDisable}" />
</CheckBox>
<CheckBox
Margin="0,0,0,2.5"
IsChecked="{Binding UseRainbowLed, Mode=TwoWay}">
<TextBlock Text="{ext:Locale ControllerSettingsLedColorRainbow}" />
</CheckBox>
<StackPanel Orientation="Horizontal" IsEnabled="{Binding !TurnOffLed}">
<TextBlock MinWidth="75" MaxWidth="200" Text="{ext:Locale ControllerSettingsLedColorRainbow}" />
<CheckBox
Margin="5"
MinWidth="0"
IsChecked="{Binding UseRainbowLed, Mode=TwoWay}">
</CheckBox>
</StackPanel>
<StackPanel Orientation="Horizontal" IsEnabled="{Binding !TurnOffLed}">
<TextBlock MinWidth="75" MaxWidth="200" Text="{ext:Locale ControllerSettingsLedColorRainbowSpeed}" />
<Slider HorizontalAlignment="Center"
<TextBlock Margin="0,0,10,2.5" Text="{ext:Locale ControllerSettingsLedColorRainbowSpeed}" />
<controls:SliderScroll
Value="{Binding RainbowSpeed}"
Width="175"
Margin="0,-3,0,0"
Height="32"
Padding="0,-5"
Width="150"
Margin="0,0,0,2.5"
TickFrequency="0.25"
IsSnapToTickEnabled="True"
LargeChange="1"
SmallChange="0.25"
VerticalAlignment="Center"
Minimum="1"
SmallChange="0.01"
Minimum="0"
Maximum="10" />
<TextBlock Margin="5,0"
MinWidth="75"
Text="{Binding RainbowSpeedText}" />
<TextBlock Margin="5,0,5,1" Text="{Binding RainbowSpeedText}" />
</StackPanel>
<StackPanel Orientation="Horizontal" IsEnabled="{Binding ShowLedColorPicker}">
<TextBlock MinWidth="75" MaxWidth="200" Text="{ext:Locale ControllerSettingsLedColor}" />
<StackPanel Margin="0,2.5,0,0" Orientation="Horizontal" IsEnabled="{Binding ShowLedColorPicker}">
<TextBlock Text="{ext:Locale ControllerSettingsLedColor}" />
<ui:ColorPickerButton
Margin="5"
Margin="20,0,0,0"
IsMoreButtonVisible="False"
UseColorPalette="False"
UseColorTriangle="False"

View file

@ -11,19 +11,22 @@
x:Class="Ryujinx.Ava.UI.Views.Input.MotionInputView"
x:DataType="viewModels:MotionInputViewModel"
Focusable="True">
<Grid Margin="10" RowDefinitions="Auto,*">
<StackPanel>
<StackPanel Orientation="Vertical">
<StackPanel
Orientation="Horizontal"
HorizontalAlignment="Center">
<Grid Margin="10,10,10,0" RowDefinitions="Auto,Auto" ColumnDefinitions="Auto,*,Auto">
<TextBlock
Margin="0"
Grid.Row="0"
Grid.Column="0"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Margin="0,0,10,0"
Text="{ext:Locale ControllerSettingsMotionGyroSensitivity}" />
<controls:SliderScroll
Margin="0,-5,0,-5"
Grid.Row="0"
Grid.Column="1"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Width="150"
MaxWidth="150"
TickFrequency="1"
IsSnapToTickEnabled="True"
SmallChange="0.01"
@ -31,21 +34,25 @@
Minimum="0"
Value="{Binding Sensitivity, Mode=TwoWay}" />
<TextBlock
Grid.Row="0"
Grid.Column="2"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Margin="5, 0"
Margin="5,0,5,1"
Text="{Binding Sensitivity, StringFormat=\{0:0\}%}" />
</StackPanel>
<StackPanel
Orientation="Horizontal"
HorizontalAlignment="Center">
<TextBlock
Margin="0"
Grid.Row="1"
Grid.Column="0"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Margin="0,0,10,0"
Text="{ext:Locale ControllerSettingsMotionGyroDeadzone}" />
<controls:SliderScroll
Margin="0,-5,0,-5"
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Width="150"
MaxWidth="150"
TickFrequency="1"
IsSnapToTickEnabled="True"
SmallChange="0.01"
@ -53,103 +60,70 @@
Minimum="0"
Value="{Binding GyroDeadzone, Mode=TwoWay}" />
<TextBlock
Grid.Row="1"
Grid.Column="2"
VerticalAlignment="Center"
Margin="5, 0"
HorizontalAlignment="Center"
Margin="5,0,5,1"
Text="{Binding GyroDeadzone, StringFormat=\{0:0.00\}}" />
</StackPanel>
<Separator
Height="1"
Margin="0,5" />
<CheckBox
Margin="5"
IsChecked="{Binding EnableCemuHookMotion}">
<TextBlock
Margin="0,3,0,0"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsMotionUseCemuhookCompatibleMotion}" />
</Grid>
<Separator Height="1" Margin="0,0,0,5" />
<CheckBox Margin="0,5,0,5" HorizontalAlignment="Center" IsChecked="{Binding EnableCemuHookMotion}">
<TextBlock VerticalAlignment="Center" Text="{ext:Locale ControllerSettingsMotionUseCemuhookCompatibleMotion}" />
</CheckBox>
</StackPanel>
<Border
Grid.Row="1"
Padding="20,5"
BorderBrush="{DynamicResource ThemeControlBorderColor}"
BorderThickness="1"
CornerRadius="5"
HorizontalAlignment="Stretch">
<Grid VerticalAlignment="Top" RowDefinitions="Auto,*">
<StackPanel
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Vertical">
<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsMotionServerHost}" />
<TextBox
Height="30"
MinWidth="100"
MaxWidth="100"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding DsuServerHost, Mode=TwoWay}" />
<TextBlock
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text=":" />
<TextBox
Height="30"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding DsuServerPort, Mode=TwoWay}" />
</StackPanel>
<StackPanel Orientation="Vertical">
<Grid RowDefinitions="*,*" ColumnDefinitions="*,*">
<TextBlock
Margin="0,10,0,0"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsMotionControllerSlot}" />
<ui:NumberBox
Grid.Row="0"
Grid.Column="1"
Name="CemuHookSlotUpDown"
SmallChange="1"
LargeChange="1"
Maximum="4"
Minimum="0"
Value="{Binding Slot}" />
<TextBlock
Margin="0,10,0,0"
Grid.Row="1"
Grid.Column="0"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsMotionRightJoyConSlot}" />
<ui:NumberBox
Grid.Row="1"
Grid.Column="1"
Name="CemuHookRightJoyConSlotUpDown"
SmallChange="1"
LargeChange="1"
Maximum="4"
Minimum="0"
Value="{Binding AltSlot}" />
</Grid>
</StackPanel>
<CheckBox
HorizontalAlignment="Center"
IsChecked="{Binding MirrorInput, Mode=TwoWay}">
<TextBlock
HorizontalAlignment="Center"
Text="{ext:Locale ControllerSettingsMotionMirrorInput}" />
</CheckBox>
<Border Padding="20,10,20,5" BorderBrush="{DynamicResource ThemeControlBorderColor}" BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal" Margin="0,0,0,7.5">
<TextBlock Margin="0,0,5,0" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{ext:Locale ControllerSettingsMotionServerHost}" />
<TextBox Height="30" MinWidth="100" MaxWidth="100" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding DsuServerHost, Mode=TwoWay}" />
<TextBlock Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center" Text=":" />
<TextBox Height="30" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding DsuServerPort, Mode=TwoWay}" />
</StackPanel>
</Grid>
<StackPanel Orientation="Vertical">
<Grid ColumnDefinitions="Auto,*,Auto" RowDefinitions="Auto,Auto" Margin="0,0,0,7.5">
<TextBlock
Grid.Column="0"
Grid.Row="0"
Margin="0,0,0,7.5"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Text="{ext:Locale ControllerSettingsMotionControllerSlot}" />
<ui:NumberBox
Grid.Column="1"
Grid.Row="0"
Margin="0,0,0,7.5"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Name="CemuHookSlotUpDown"
SmallChange="1"
LargeChange="1"
Maximum="4"
Minimum="0"
Value="{Binding Slot}" />
<TextBlock
Grid.Column="0"
Grid.Row="1"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Text="{ext:Locale ControllerSettingsMotionRightJoyConSlot}" />
<ui:NumberBox
Grid.Column="1"
Grid.Row="1"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Name="CemuHookRightJoyConSlotUpDown"
SmallChange="1"
LargeChange="1"
Maximum="4"
Minimum="0"
Value="{Binding AltSlot}" />
</Grid>
</StackPanel>
<CheckBox HorizontalAlignment="Center" IsChecked="{Binding MirrorInput, Mode=TwoWay}">
<TextBlock HorizontalAlignment="Center" Text="{ext:Locale ControllerSettingsMotionMirrorInput}" />
</CheckBox>
</StackPanel>
</Border>
</Grid>
</StackPanel>
</UserControl>

View file

@ -10,49 +10,46 @@
x:Class="Ryujinx.Ava.UI.Views.Input.RumbleInputView"
x:DataType="viewModels:RumbleInputViewModel"
Focusable="True">
<Grid Margin="10" RowDefinitions="Auto,*">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock
Width="100"
TextWrapping="WrapWithOverflow"
HorizontalAlignment="Center"
Text="{ext:Locale ControllerSettingsRumbleStrongMultiplier}" />
<controls:SliderScroll
Margin="0,-5,0,-5"
Width="200"
TickFrequency="0.01"
IsSnapToTickEnabled="True"
SmallChange="0.01"
Maximum="10"
Minimum="0"
Value="{Binding StrongRumble, Mode=TwoWay}" />
<TextBlock
VerticalAlignment="Center"
Margin="5,0"
Text="{Binding StrongRumble, StringFormat=\{0:0.00\}}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock
Width="100"
TextWrapping="WrapWithOverflow"
HorizontalAlignment="Center"
Text="{ext:Locale ControllerSettingsRumbleWeakMultiplier}" />
<controls:SliderScroll
Margin="0,-5,0,-5"
Width="200"
MaxWidth="200"
Maximum="10"
TickFrequency="0.01"
IsSnapToTickEnabled="True"
SmallChange="0.01"
Minimum="0"
Value="{Binding WeakRumble, Mode=TwoWay}" />
<TextBlock
VerticalAlignment="Center"
Margin="5,0"
Text="{Binding WeakRumble, StringFormat=\{0:0.00\}}" />
</StackPanel>
</StackPanel>
<Grid Margin="10" RowDefinitions="Auto,Auto" ColumnDefinitions="Auto,*,Auto">
<TextBlock
Grid.Row="0"
Grid.Column="0"
Margin="0,0,10,0"
Text="{ext:Locale ControllerSettingsRumbleStrongMultiplier}" />
<controls:SliderScroll
Grid.Row="0"
Grid.Column="1"
Width="150"
TickFrequency="0.01"
IsSnapToTickEnabled="True"
SmallChange="0.01"
Maximum="10"
Minimum="0"
Value="{Binding StrongRumble, Mode=TwoWay}" />
<TextBlock
Grid.Row="0"
Grid.Column="2"
Margin="5,0,5,1"
Text="{Binding StrongRumble, StringFormat=\{0:0.00\}}" />
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="0,0,10,0"
Text="{ext:Locale ControllerSettingsRumbleWeakMultiplier}" />
<controls:SliderScroll
Grid.Row="1"
Grid.Column="1"
Width="150"
Maximum="10"
TickFrequency="0.01"
IsSnapToTickEnabled="True"
SmallChange="0.01"
Minimum="0"
Value="{Binding WeakRumble, Mode=TwoWay}" />
<TextBlock
Grid.Row="1"
Grid.Column="2"
Margin="5,0,5,1"
Text="{Binding WeakRumble, StringFormat=\{0:0.00\}}" />
</Grid>
</UserControl>

View file

@ -43,6 +43,7 @@
Spacing="10">
<CheckBox
ToolTip.Tip="{ext:Locale UseGlobalInputTooltip}"
ToolTip.Placement="Right"
MinWidth="0"
IsChecked="{Binding UseGlobalInputConfig}">
<TextBlock
@ -50,6 +51,7 @@
</CheckBox>
<CheckBox
ToolTip.Tip="{ext:Locale DockModeToggleTooltip}"
ToolTip.Placement="Right"
MinWidth="0"
IsChecked="{Binding EnableDockedMode}">
<TextBlock
@ -57,12 +59,14 @@
</CheckBox>
<CheckBox
ToolTip.Tip="{ext:Locale DirectKeyboardTooltip}"
ToolTip.Placement="Right"
IsChecked="{Binding EnableKeyboard}">
<TextBlock
Text="{ext:Locale SettingsTabInputDirectKeyboardAccess}" />
</CheckBox>
<CheckBox
ToolTip.Tip="{ext:Locale DirectMouseTooltip}"
ToolTip.Placement="Right"
IsChecked="{Binding EnableMouse}">
<TextBlock
Text="{ext:Locale SettingsTabInputDirectMouseAccess}" />

View file

@ -29,6 +29,8 @@ namespace Ryujinx.Ava.UI.Windows
ConfigurationState.Instance.ShowOldUI
? NavigationViewPaneDisplayMode.Left
: NavigationViewPaneDisplayMode.Top;
NavPanel.IsPaneOpen = false;
Height = ConfigurationState.Instance.ShowOldUI
? 906