Files
ryujinx/src/Ryujinx/UI/Views/Input/LedInputView.axaml
2025-11-15 18:54:35 +02:00

56 lines
2.8 KiB
XML

<UserControl 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:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels.Input"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:DataType="viewModels:LedInputViewModel"
x:Class="Ryujinx.UI.Views.Input.LedInputView">
<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 Margin="0,0,10,2.5" Text="{ext:Locale ControllerSettingsLedColorRainbowSpeed}" />
<controls:SliderScroll
Value="{Binding RainbowSpeed}"
Width="150"
Margin="0,0,0,2.5"
TickFrequency="0.25"
IsSnapToTickEnabled="True"
LargeChange="1"
SmallChange="0.25"
Minimum="0"
Maximum="10" />
<TextBlock Margin="5,0,0,2.5" Text="{Binding RainbowSpeedText}" />
</StackPanel>
<StackPanel Margin="0,2.5,0,0" Orientation="Horizontal" IsEnabled="{Binding ShowLedColorPicker}">
<TextBlock Text="{ext:Locale ControllerSettingsLedColor}" />
<ui:ColorPickerButton
Margin="20,0,0,0"
IsMoreButtonVisible="False"
UseColorPalette="False"
UseColorTriangle="False"
UseColorWheel="False"
ShowAcceptDismissButtons="False"
IsAlphaEnabled="False"
AttachedToVisualTree="ColorPickerButton_OnAttachedToVisualTree"
ColorChanged="ColorPickerButton_OnColorChanged"
Color="{Binding LedColor, Mode=TwoWay}">
</ui:ColorPickerButton>
</StackPanel>
</StackPanel>
</UserControl>