Merge branch 'ui-updates-settings-input' into 'master'

UI: Settings → Input Updates

See merge request [ryubing/ryujinx!160](https://git.ryujinx.app/ryubing/ryujinx/-/merge_requests/160)
merge-requests/160/merge
Neo 2025-10-26 08:52:38 -05:00
commit f361b339b9
14 changed files with 2550 additions and 3766 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 67 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 65 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 74 KiB

85
src/Ryujinx/Assets/Icons/Controller_ProCon.svg Normal file → Executable file
View File

@ -1,84 +1 @@
<?xml version="1.0" encoding="UTF-8"?> <svg enable-background="new 0 0 1050 1050.5" viewBox="0 0 1050 1050.5" xmlns="http://www.w3.org/2000/svg"><path d="m766 850.5c34 28.2 27.6 35.9 68.5 108.5 36.7 74.7 64.4 104.4 125.1 84.1 95.3-57.9 59.3-145.3 43.6-275.2-10-60.6-35.6-190.3-35.6-190.3z" fill="#20221f"/><path d="m82.3 577.6s-25.6 129.7-35.6 190.3c-15.7 129.9-51.7 217.2 43.6 275.1 60.8 20.3 88.4-9.4 125.1-84.1 40.9-72.7 34.5-80.3 68.5-108.5z" fill="#20221f"/><path d="m676.3 378.4c10.1-4.3 39.7-22.5 58.7-19.7 59.5.9 166.7 17.7 172.6 81.2" fill="#3b3b3b"/><path d="m142.4 439.9c5.9-63.4 113-80.2 172.6-81.2 19-2.8 48.6 15.4 58.7 19.7" fill="#3b3b3b"/><path d="m766 850.5c35.5-30.8 68.5-74.7 96-113.5 26.9-36.3 94.7-136.7 105.6-159.3 0-2.4-6.3-30.1-12.8-56.2-35.7-159.6-252.6-143.4-429.8-143.4-177.4 0-394.1-16.2-429.9 143.3-6.5 26-12.8 53.8-12.8 56.2 10.9 22.6 78.8 123 105.6 159.3 27.5 38.8 60.5 82.8 96 113.5" fill="#121212"/><path d="m466.2 683.5h-40c-2.8 0-5-2.2-5-5v-40c0-2.8-2.2-5-5-5h-30c-2.8 0-5 2.2-5 5v40c0 2.8-2.2 5-5 5h-40c-2.8 0-5 2.2-5 5v30c0 2.8 2.2 5 5 5h40c2.8 0 5 2.2 5 5v40c0 2.8 2.2 5 5 5h30c2.8 0 5-2.2 5-5v-40c0-2.8 2.2-5 5-5h40c2.8 0 5-2.2 5-5v-30c0-2.7-2.2-5-5-5z" fill="#444542"/><g fill="#fff"><path d="m393.7 746h15l-7.5 15z"/><path d="m358.7 696v15l-15-7.5z"/><path d="m408.7 661h-15l7.5-15z"/><path d="m443.7 711v-15l15 7.5z"/></g><circle cx="650.6" cy="703.5" fill="#20221f" r="55"/><circle cx="650.6" cy="703.5" fill="#444542" r="45" stroke="#fff" stroke-miterlimit="10" stroke-width="2"/><circle cx="240.2" cy="564.8" fill="#20221f" r="55"/><circle cx="240.2" cy="564.8" fill="#444542" r="45" stroke="#fff" stroke-miterlimit="10" stroke-width="2"/><circle cx="401" cy="489.3" fill="#454644" r="22.5"/><path d="m386.2 491.8v-5h30v5" fill="#fff"/><circle cx="650.4" cy="489.6" fill="#454644" r="22.5"/><path d="m665.6 487.1h-12.5v-12.7h-5v12.7h-12.5v5h12.5v12.3h5v-12.3h12.5z" fill="#fff"/><circle cx="605.4" cy="564.8" fill="#454644" r="22.5"/><path d="m605.4 549.8-15 15h5v15h20v-15h5zm5 25h-10v-10h10z" fill="#fff"/><path d="m468.6 586.5h-30c-2.8 0-5-2.2-5-5v-29.5c0-2.8 2.2-5 5-5h30c2.8 0 5 2.2 5 5v29.5c0 2.7-2.2 5-5 5z" fill="#454644"/><circle cx="453.6" cy="566.7" fill="#454644" r="15" stroke="#fff" stroke-miterlimit="10" stroke-width="2"/><circle cx="863.9" cy="564.8" fill="#3b3c3a" r="35"/><text fill="#fff" font-family="'Helvetica-Bold'" font-size="40" transform="translate(849.4224 578.6607)">A</text><circle cx="793.9" cy="494.8" fill="#3b3c3a" r="35"/><text fill="#fff" font-family="'Helvetica-Bold'" font-size="40" transform="translate(780.5266 508.6604)">X</text><circle cx="723.9" cy="564.8" fill="#3b3c3a" r="35"/><text fill="#fff" font-family="'Helvetica-Bold'" font-size="40" transform="translate(710.5263 578.661)">Y</text><circle cx="793.9" cy="634.8" fill="#3b3c3a" r="35"/><text fill="#fff" font-family="'Helvetica-Bold'" font-size="40" transform="translate(780.9706 648.6605)">B</text><path d="m219.2 78.5c-12.5-17.6-25.9-42.3-45.6-58.6-20.1-16.6-61.5-24.6-86.5-14.1-13.9 5.8-33.4 33.1-42.7 52.8-10.5 22.3-14 51.3-12.4 82.8 1.2 25.1 5.3 51.7 14.2 78.6 0 0 14.3 53.8 42.8 80.8 11.2 10.6 35 26.6 35 26.6l116-217.5s-15.4-23.7-20.8-31.4z" fill="#20221f"/><path d="m828.6 78.5c12.5-17.6 25.9-42.3 45.6-58.6 20.1-16.6 61.4-24.5 86.5-14.1 13.9 5.8 33.4 33.1 42.7 52.8 10.5 22.3 13.9 51.3 12.4 82.8-1.2 25.1-5.3 51.7-14.2 78.6 0 0-14.3 53.8-42.8 80.8-11.2 10.6-35 26.6-35 26.6l-116-217.5s15.4-23.7 20.8-31.4z" fill="#20221f"/><path d="m866 122.2c66.3 18.7 85.1 128.8 69 186-2.5 54.2-148.9 15.3-265.1 31.2-41.1 1.7-91.8 2.4-145.9 2.3-54.1 0-104.8-.6-145.9-2.3-116.2-15.9-262.6 23.1-265.1-31.2-16.1-57.1 2.6-167.3 69-186l60.5-18.8 38.9-1.9c40.2.1 142.8 0 242.7 0s202.4.1 242.7 0l38.9 1.9z" fill="#0d0d0a"/><path d="m145.9 239.2c15.2-97.4 38.1-147.2 141.7-137 8.2 16.4 43.3 83 50.6 105.7-57.6 19.3-133.5 17.7-192.3 31.3z" fill="#3b3b3b"/><text fill="#fff" font-family="'Helvetica-Bold'" font-size="40" transform="matrix(1.0139 0 0 1 218.3906 179.3992)">ZL</text><path d="m716.2 207.9c7.4-22.7 42.5-89.3 50.6-105.7 103.7-10.2 126.5 39.6 141.7 137-58.7-13.6-134.7-12-192.3-31.3z" fill="#3b3b3b"/><text fill="#fff" font-family="'Helvetica-Bold'" font-size="40" transform="matrix(1.0139 0 0 1 784.2356 179.3992)">ZR</text><path d="m664 318.5c7-10.1 27.8-78.4 45.4-78.7 331.4 3.9 187.7 94.2-45.4 78.7z" fill="#3b3b3b"/><text fill="#fff" font-family="'Helvetica-Bold'" font-size="40" transform="translate(769.6461 292.8947)">R</text><path d="m340.6 238.6c17.6.3 38.4 68.6 45.4 78.7-233.1 15.5-376.8-74.7-45.4-78.7z" fill="#3b3b3b"/><text fill="#fff" font-family="'Helvetica-Bold'" font-size="40" transform="translate(253.7327 291.7279)">L</text></svg>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 996.25 690.92">
<defs>
<style>
.cls-1 {
stroke: #fff;
stroke-miterlimit: 10;
stroke-width: 2px;
}
.cls-1, .cls-2 {
fill: #444542;
}
.cls-3 {
fill: #3b3b3b;
}
.cls-3, .cls-4, .cls-2, .cls-5, .cls-6, .cls-7 {
stroke-width: 0px;
}
.cls-4 {
fill: #3b3c3a;
}
.cls-5 {
fill: #454644;
}
.cls-6 {
fill: #20221f;
}
.cls-7 {
fill: #121212;
}
</style>
</defs>
<g id="Front">
<path id="Right_Grip" data-name="Right Grip" class="cls-6" d="m739.17,492.09c34,28.2,27.6,35.9,68.5,108.5,36.7,74.7,64.4,104.4,125.1,84.1h0c95.3-57.9,59.3-145.3,43.6-275.2-10-60.6-35.6-190.3-35.6-190.3l-201.6,272.9Z"/>
<path id="Left_Grip" data-name="Left Grip" class="cls-6" d="m55.47,219.19s-25.6,129.7-35.6,190.3c-15.7,129.9-51.7,217.2,43.6,275.1h0c60.8,20.3,88.4-9.4,125.1-84.1,40.9-72.7,34.5-80.3,68.5-108.5L55.47,219.19Z"/>
<path id="Right_Bumper" data-name="Right Bumper" class="cls-3" d="m649.47,19.99c10.1-4.3,39.7-22.5,58.7-19.7,59.5.9,166.7,17.7,172.6,81.2"/>
<path id="Left_Bumper" data-name="Left Bumper" class="cls-3" d="m115.57,81.49C121.47,18.09,228.57,1.29,288.17.29c19-2.8,48.6,15.4,58.7,19.7"/>
<path id="Background" class="cls-7" d="m739.17,492.09c35.5-30.8,68.5-74.7,96-113.5,26.9-36.3,94.7-136.7,105.6-159.3,0-2.4-6.3-30.1-12.8-56.2C892.27,3.49,675.37,19.69,498.17,19.69S104.07,3.49,68.27,162.99c-6.5,26-12.8,53.8-12.8,56.2,10.9,22.6,78.8,123,105.6,159.3,27.5,38.8,60.5,82.8,96,113.5"/>
<g id="Directional_Pad" data-name="Directional Pad">
<path id="Background-2" data-name="Background" class="cls-2" d="m439.37,325.09h-40c-2.8,0-5-2.2-5-5v-40c0-2.8-2.2-5-5-5h-30c-2.8,0-5,2.2-5,5v40c0,2.8-2.2,5-5,5h-40c-2.8,0-5,2.2-5,5v30c0,2.8,2.2,5,5,5h40c2.8,0,5,2.2,5,5v40c0,2.8,2.2,5,5,5h30c2.8,0,5-2.2,5-5v-40c0-2.8,2.2-5,5-5h40c2.8,0,5-2.2,5-5v-30c0-2.7-2.2-5-5-5Z"/>
</g>
<g id="R_Thumbstick" data-name="R Thumbstick">
<circle id="Background-3" data-name="Background" class="cls-6" cx="623.77" cy="345.09" r="55"/>
<circle id="Stick" class="cls-1" cx="623.77" cy="345.09" r="45"/>
</g>
<g id="L_Thumbstick" data-name="L Thumbstick">
<circle id="Background-4" data-name="Background" class="cls-6" cx="213.37" cy="206.39" r="55"/>
<circle id="Stick-2" data-name="Stick" class="cls-1" cx="213.37" cy="206.39" r="45" transform="translate(-24.53 383.95) rotate(-80.78)"/>
</g>
<g id="Minus_Button" data-name="Minus Button">
<circle id="_Background" data-name=" Background" class="cls-5" cx="374.17" cy="130.89" r="22.5"/>
</g>
<g id="Plus_Button" data-name="Plus Button">
<circle id="_Background-2" data-name=" Background" class="cls-5" cx="623.57" cy="131.19" r="22.5"/>
</g>
<g id="Home_Button" data-name="Home Button">
<circle id="_Background-3" data-name=" Background" class="cls-5" cx="578.57" cy="206.39" r="22.5"/>
</g>
<g id="Capture_Button" data-name="Capture Button">
<path class="cls-5" d="m441.77,228.09h-30c-2.8,0-5-2.2-5-5v-29.5c0-2.8,2.2-5,5-5h30c2.8,0,5,2.2,5,5v29.5c0,2.7-2.2,5-5,5Z"/>
</g>
<g id="Buttons">
<g id="A_Button" data-name="A Button">
<circle id="Background-5" data-name="Background" class="cls-4" cx="837.07" cy="206.39" r="35"/>
</g>
<g id="X_Button" data-name="X Button">
<circle id="Background-6" data-name="Background" class="cls-4" cx="767.07" cy="136.39" r="35"/>
</g>
<g id="Y_Button" data-name="Y Button">
<circle id="Background-7" data-name="Background" class="cls-4" cx="697.07" cy="206.39" r="35"/>
</g>
<g id="B_Button" data-name="B Button">
<circle id="Background-8" data-name="Background" class="cls-4" cx="767.07" cy="276.39" r="35"/>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -323,7 +323,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
PlayerIndexes.Add(new(PlayerIndex.Player6, LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer6])); PlayerIndexes.Add(new(PlayerIndex.Player6, LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer6]));
PlayerIndexes.Add(new(PlayerIndex.Player7, LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer7])); PlayerIndexes.Add(new(PlayerIndex.Player7, LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer7]));
PlayerIndexes.Add(new(PlayerIndex.Player8, LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer8])); 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]));
} }
@ -503,7 +503,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
if (_playerId == PlayerIndex.Handheld) if (_playerId == PlayerIndex.Handheld)
{ {
Controllers.Add(new(ControllerType.Handheld, LocaleManager.Instance[LocaleKeys.ControllerSettingsControllerTypeHandheld])); Controllers.Add(new(ControllerType.Handheld, LocaleManager.Instance[LocaleKeys.Handheld]));
Controller = 0; Controller = 0;
} }

View File

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

View File

@ -20,217 +20,70 @@
<Design.DataContext> <Design.DataContext>
<viewModels:InputViewModel /> <viewModels:InputViewModel />
</Design.DataContext> </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 <StackPanel
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Orientation="Vertical"> Orientation="Vertical">
<StackPanel <Grid ColumnDefinitions="Auto,1.65*,Auto,1.5*" Margin="0,0,0,15">
Margin="0 0 0 5" <Grid Grid.Column="0" Margin="0,2,10,2" HorizontalAlignment="Stretch" VerticalAlignment="Center" ColumnDefinitions="Auto,*,Auto">
Orientation="Vertical" <ComboBox Grid.Column="1" Name="PlayerIndexBox" HorizontalAlignment="Stretch" VerticalAlignment="Center" SelectionChanged="PlayerIndexBox_OnSelectionChanged" ItemsSource="{Binding PlayerIndexes}" SelectedIndex="{Binding PlayerId}">
Spacing="5"> <ComboBox.ItemTemplate>
<Grid ColumnDefinitions="*,10,*"> <DataTemplate>
<!-- Player Selection --> <TextBlock Text="{Binding Name}" />
<Grid </DataTemplate>
Grid.Column="0" </ComboBox.ItemTemplate>
Margin="2" </ComboBox>
HorizontalAlignment="Stretch" <Button Grid.Column="2" MinWidth="0" Margin="5,0,0,0" VerticalAlignment="Center" ToolTip.Tip="{ext:Locale ControllerSettingsCancelCurrentChangesToolTip}" Command="{Binding RevertChanges}">
VerticalAlignment="Center" ColumnDefinitions="Auto,*,Auto"> <ui:SymbolIcon Symbol="Undo" FontSize="15" Height="20" />
<StackPanel </Button>
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> </Grid>
<Separator /> <Grid Grid.Column="1" Margin="10,2,10,2" HorizontalAlignment="Stretch" VerticalAlignment="Center" ColumnDefinitions="Auto,*,Auto">
<Grid ColumnDefinitions="*,10,*"> <ComboBox Grid.Column="1" Name="DeviceBox" HorizontalAlignment="Stretch" VerticalAlignment="Center" ItemsSource="{Binding DeviceList}" SelectedIndex="{Binding Device}" />
<!-- Input Device --> <Button Grid.Column="2" MinWidth="0" Margin="5,0,0,0" VerticalAlignment="Center" Command="{Binding LoadDevice}">
<Grid <ui:SymbolIcon Symbol="Refresh" FontSize="15" Height="20"/>
Grid.Column="0" </Button>
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>
</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 IsVisible="{Binding NotificationIsVisible}">
<ContentControl.Content> <ContentControl.Content>
<StackPanel> <StackPanel>
<TextBlock <TextBlock Margin="5,20,0,0" Text="{Binding NotificationText}" />
Margin="5,20,0,0" <Button MinWidth="0" Width="90" Height="27" Margin="0,10,0,0" VerticalAlignment="Center" Command="{Binding UnlinkDevice}">
Text="{Binding NotificationText}" /> <TextBlock Text="{ext:Locale ControllerSettingsUnlink}" VerticalAlignment="Center" HorizontalAlignment="Center" />
<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> </Button>
</StackPanel> </StackPanel>
</ContentControl.Content> </ContentControl.Content>
</ContentControl> </ContentControl>
<ContentControl Content="{Binding ConfigViewModel}" IsVisible="{Binding ShowSettings}"> <ContentControl Content="{Binding ConfigViewModel}" IsVisible="{Binding ShowSettings}">
<ContentControl.DataTemplates> <ContentControl.DataTemplates>
<DataTemplate DataType="viewModels:ControllerInputViewModel"> <DataTemplate DataType="viewModels:ControllerInputViewModel">
<views:ControllerInputView /> <views:ControllerInputView />
</DataTemplate> </DataTemplate>
<DataTemplate DataType="viewModels:KeyboardInputViewModel"> <DataTemplate DataType="viewModels:KeyboardInputViewModel">
<views:KeyboardInputView /> <views:KeyboardInputView />
</DataTemplate> </DataTemplate>
</ContentControl.DataTemplates> </ContentControl.DataTemplates>
</ContentControl> </ContentControl>
</StackPanel> </StackPanel>
</UserControl> </UserControl>

View File

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

View File

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

View File

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

View File

@ -106,7 +106,7 @@
</StackPanel> </StackPanel>
</ToolTip.Tip> </ToolTip.Tip>
<TextBlock <TextBlock
Margin="1.5" Padding="1.5"
Tag="{Binding IdString}" Tag="{Binding IdString}"
Text="{Binding LocalizedStatus}" Text="{Binding LocalizedStatus}"
Foreground="{Binding PlayabilityStatus, Converter={x:Static helpers:PlayabilityStatusConverter.Shared}}" Foreground="{Binding PlayabilityStatus, Converter={x:Static helpers:PlayabilityStatusConverter.Shared}}"

View File

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

View File

@ -30,6 +30,8 @@ namespace Ryujinx.Ava.UI.Windows
? NavigationViewPaneDisplayMode.Left ? NavigationViewPaneDisplayMode.Left
: NavigationViewPaneDisplayMode.Top; : NavigationViewPaneDisplayMode.Top;
NavPanel.IsPaneOpen = false;
Height = ConfigurationState.Instance.ShowOldUI Height = ConfigurationState.Instance.ShowOldUI
? 906 ? 906
: 954; // nav panel is put on top with custom title bar so account for new height : 954; // nav panel is put on top with custom title bar so account for new height