MotionSettingsWindow.axaml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <UserControl
  2. xmlns="https://github.com/avaloniaui"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
  7. xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
  8. mc:Ignorable="d"
  9. x:Class="Ryujinx.Ava.UI.Windows.MotionSettingsWindow"
  10. Focusable="True">
  11. <Grid Margin="10">
  12. <Grid.RowDefinitions>
  13. <RowDefinition Height="Auto" />
  14. <RowDefinition />
  15. </Grid.RowDefinitions>
  16. <StackPanel Orientation="Vertical">
  17. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  18. <TextBlock
  19. Margin="0"
  20. HorizontalAlignment="Center"
  21. Text="{locale:Locale ControllerSettingsMotionGyroSensitivity}" />
  22. <Slider
  23. Margin="0,-5,0,-5"
  24. Width="150"
  25. MaxWidth="150"
  26. TickFrequency="0.01"
  27. IsSnapToTickEnabled="True"
  28. Maximum="100"
  29. Minimum="0"
  30. Value="{Binding Sensitivity, Mode=TwoWay}" />
  31. <TextBlock HorizontalAlignment="Center"
  32. Margin="5, 0"
  33. Text="{Binding Sensitivity, StringFormat=\{0:0\}%}" />
  34. </StackPanel>
  35. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  36. <TextBlock
  37. Margin="0"
  38. HorizontalAlignment="Center"
  39. Text="{locale:Locale ControllerSettingsMotionGyroDeadzone}" />
  40. <Slider
  41. Margin="0,-5,0,-5"
  42. Width="150"
  43. MaxWidth="150"
  44. TickFrequency="0.01"
  45. IsSnapToTickEnabled="True"
  46. Maximum="100"
  47. Minimum="0"
  48. Value="{Binding GyroDeadzone, Mode=TwoWay}" />
  49. <TextBlock
  50. VerticalAlignment="Center"
  51. Margin="5, 0"
  52. Text="{Binding GyroDeadzone, StringFormat=\{0:0.00\}}" />
  53. </StackPanel>
  54. <Separator Height="1" Margin="0,5" />
  55. <CheckBox Margin="5" IsChecked="{Binding EnableCemuHookMotion}">
  56. <TextBlock Margin="0,3,0,0" VerticalAlignment="Center"
  57. Text="{locale:Locale ControllerSettingsMotionUseCemuhookCompatibleMotion}" />
  58. </CheckBox>
  59. </StackPanel>
  60. <Border Grid.Row="1"
  61. Padding="20,5"
  62. BorderBrush="{DynamicResource ThemeControlBorderColor}"
  63. BorderThickness="1"
  64. HorizontalAlignment="Stretch">
  65. <Grid VerticalAlignment="Top">
  66. <Grid.RowDefinitions>
  67. <RowDefinition Height="Auto" />
  68. <RowDefinition Height="*" />
  69. </Grid.RowDefinitions>
  70. <StackPanel
  71. Grid.Row="1"
  72. HorizontalAlignment="Center"
  73. VerticalAlignment="Center"
  74. Orientation="Vertical">
  75. <StackPanel
  76. HorizontalAlignment="Center"
  77. VerticalAlignment="Center"
  78. Orientation="Horizontal">
  79. <TextBlock
  80. Margin="5"
  81. HorizontalAlignment="Center"
  82. VerticalAlignment="Center"
  83. Text="{locale:Locale ControllerSettingsMotionServerHost}" />
  84. <TextBox
  85. Height="30"
  86. MinWidth="100"
  87. MaxWidth="100"
  88. HorizontalAlignment="Center"
  89. VerticalAlignment="Center"
  90. Text="{Binding DsuServerHost, Mode=TwoWay}" />
  91. <TextBlock
  92. Margin="5"
  93. HorizontalAlignment="Center"
  94. VerticalAlignment="Center"
  95. Text=":" />
  96. <TextBox
  97. Height="30"
  98. HorizontalAlignment="Center"
  99. VerticalAlignment="Center"
  100. Text="{Binding DsuServerPort, Mode=TwoWay}" />
  101. </StackPanel>
  102. <StackPanel Orientation="Vertical">
  103. <Grid>
  104. <Grid.RowDefinitions>
  105. <RowDefinition />
  106. <RowDefinition />
  107. </Grid.RowDefinitions>
  108. <Grid.ColumnDefinitions>
  109. <ColumnDefinition />
  110. <ColumnDefinition />
  111. </Grid.ColumnDefinitions>
  112. <TextBlock Margin="0,10,0,0" VerticalAlignment="Center"
  113. Text="{locale:Locale ControllerSettingsMotionControllerSlot}" />
  114. <ui:NumberBox Grid.Row="0" Grid.Column="1"
  115. Name="CemuHookSlotUpDown"
  116. SmallChange="1"
  117. LargeChange="1"
  118. Maximum="4"
  119. Minimum="0"
  120. Value="{Binding Slot}" />
  121. <TextBlock Margin="0,10,0,0" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"
  122. Text="{locale:Locale ControllerSettingsMotionRightJoyConSlot}" />
  123. <ui:NumberBox Grid.Row="1" Grid.Column="1"
  124. Name="CemuHookRightJoyConSlotUpDown"
  125. SmallChange="1"
  126. LargeChange="1"
  127. Maximum="4"
  128. Minimum="0"
  129. Value="{Binding AltSlot}" />
  130. </Grid>
  131. </StackPanel>
  132. <CheckBox HorizontalAlignment="Center"
  133. IsChecked="{Binding MirrorInput, Mode=TwoWay}">
  134. <TextBlock HorizontalAlignment="Center"
  135. Text="{locale:Locale ControllerSettingsMotionMirrorInput}" />
  136. </CheckBox>
  137. </StackPanel>
  138. </Grid>
  139. </Border>
  140. </Grid>
  141. </UserControl>