This commit is contained in:
Isaac Marovitz 2023-05-19 17:45:35 -04:00 committed by Isaac Marovitz
parent 9bbee3041e
commit 71fa81017b
2 changed files with 62 additions and 54 deletions

View file

@ -25,6 +25,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
{ {
_isLeft = value; _isLeft = value;
OnPropertyChanged(); OnPropertyChanged();
OnPropertyChanged(nameof(HasSides));
} }
} }
@ -36,9 +37,12 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
{ {
_isRight = value; _isRight = value;
OnPropertyChanged(); OnPropertyChanged();
OnPropertyChanged(nameof(HasSides));
} }
} }
public bool HasSides => IsLeft ^ IsRight;
private SvgImage _image; private SvgImage _image;
public SvgImage Image public SvgImage Image
{ {

View file

@ -350,76 +350,80 @@
Text="{Binding Config.TriggerThreshold, StringFormat=\{0:0.00\}}" /> Text="{Binding Config.TriggerThreshold, StringFormat=\{0:0.00\}}" />
</StackPanel> </StackPanel>
<StackPanel <StackPanel
Margin="0,4,0,0" Orientation="Vertical"
HorizontalAlignment="Center" IsVisible="{Binding HasSides}">
VerticalAlignment="Center" <StackPanel
IsVisible="{Binding IsLeft}" Margin="0,4,0,0"
Orientation="Horizontal">
<TextBlock
Width="20"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{locale:Locale ControllerSettingsLeftSR}" IsVisible="{Binding IsLeft}"
TextAlignment="Center" /> Orientation="Horizontal">
<ToggleButton Name="LeftButtonSr">
<TextBlock <TextBlock
Text="{Binding Config.LeftButtonSr, Converter={StaticResource Key}}" Width="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{locale:Locale ControllerSettingsLeftSR}"
TextAlignment="Center" /> TextAlignment="Center" />
</ToggleButton> <ToggleButton Name="LeftButtonSr">
</StackPanel> <TextBlock
<StackPanel Text="{Binding Config.LeftButtonSr, Converter={StaticResource Key}}"
Margin="0,4,0,0" TextAlignment="Center" />
HorizontalAlignment="Center" </ToggleButton>
VerticalAlignment="Center" </StackPanel>
IsVisible="{Binding IsLeft}" <StackPanel
Orientation="Horizontal"> Margin="0,4,0,0"
<TextBlock
Width="20"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{locale:Locale ControllerSettingsLeftSL}" IsVisible="{Binding IsLeft}"
TextAlignment="Center" /> Orientation="Horizontal">
<ToggleButton Name="LeftButtonSl">
<TextBlock <TextBlock
Text="{Binding Config.LeftButtonSl, Converter={StaticResource Key}}" Width="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{locale:Locale ControllerSettingsLeftSL}"
TextAlignment="Center" /> TextAlignment="Center" />
</ToggleButton> <ToggleButton Name="LeftButtonSl">
</StackPanel> <TextBlock
<StackPanel Text="{Binding Config.LeftButtonSl, Converter={StaticResource Key}}"
Margin="0,4,0,0" TextAlignment="Center" />
HorizontalAlignment="Center" </ToggleButton>
VerticalAlignment="Center" </StackPanel>
IsVisible="{Binding IsRight}" <StackPanel
Orientation="Horizontal"> Margin="0,4,0,0"
<TextBlock
Width="20"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{locale:Locale ControllerSettingsRightSR}" IsVisible="{Binding IsRight}"
TextAlignment="Center" /> Orientation="Horizontal">
<ToggleButton Name="RightButtonSr">
<TextBlock <TextBlock
Text="{Binding Config.RightButtonSr, Converter={StaticResource Key}}" Width="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{locale:Locale ControllerSettingsRightSR}"
TextAlignment="Center" /> TextAlignment="Center" />
</ToggleButton> <ToggleButton Name="RightButtonSr">
</StackPanel> <TextBlock
<StackPanel Text="{Binding Config.RightButtonSr, Converter={StaticResource Key}}"
Margin="0,4,0,0" TextAlignment="Center" />
HorizontalAlignment="Center" </ToggleButton>
VerticalAlignment="Center" </StackPanel>
IsVisible="{Binding IsRight}" <StackPanel
Orientation="Horizontal"> Margin="0,4,0,0"
<TextBlock
Width="20"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{locale:Locale ControllerSettingsRightSL}" IsVisible="{Binding IsRight}"
TextAlignment="Center" /> Orientation="Horizontal">
<ToggleButton Name="RightButtonSl">
<TextBlock <TextBlock
Text="{Binding Config.RightButtonSl, Converter={StaticResource Key}}" Width="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{locale:Locale ControllerSettingsRightSL}"
TextAlignment="Center" /> TextAlignment="Center" />
</ToggleButton> <ToggleButton Name="RightButtonSl">
<TextBlock
Text="{Binding Config.RightButtonSl, Converter={StaticResource Key}}"
TextAlignment="Center" />
</ToggleButton>
</StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Border> </Border>