MotionInputView.axaml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
  9. mc:Ignorable="d"
  10. x:Class="Ryujinx.Ava.UI.Views.Input.MotionInputView"
  11. x:CompileBindings="True"
  12. x:DataType="viewModels:MotionInputViewModel"
  13. Focusable="True">
  14. <Grid Margin="10">
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="Auto" />
  17. <RowDefinition />
  18. </Grid.RowDefinitions>
  19. <StackPanel Orientation="Vertical">
  20. <StackPanel
  21. Orientation="Horizontal"
  22. HorizontalAlignment="Center">
  23. <TextBlock
  24. Margin="0"
  25. HorizontalAlignment="Center"
  26. Text="{locale:Locale ControllerSettingsMotionGyroSensitivity}" />
  27. <Slider
  28. Margin="0,-5,0,-5"
  29. Width="150"
  30. MaxWidth="150"
  31. TickFrequency="0.01"
  32. IsSnapToTickEnabled="True"
  33. Maximum="100"
  34. Minimum="0"
  35. Value="{Binding Sensitivity, Mode=TwoWay}" />
  36. <TextBlock
  37. HorizontalAlignment="Center"
  38. Margin="5, 0"
  39. Text="{Binding Sensitivity, StringFormat=\{0:0\}%}" />
  40. </StackPanel>
  41. <StackPanel
  42. Orientation="Horizontal"
  43. HorizontalAlignment="Center">
  44. <TextBlock
  45. Margin="0"
  46. HorizontalAlignment="Center"
  47. Text="{locale:Locale ControllerSettingsMotionGyroDeadzone}" />
  48. <Slider
  49. Margin="0,-5,0,-5"
  50. Width="150"
  51. MaxWidth="150"
  52. TickFrequency="0.01"
  53. IsSnapToTickEnabled="True"
  54. Maximum="100"
  55. Minimum="0"
  56. Value="{Binding GyroDeadzone, Mode=TwoWay}" />
  57. <TextBlock
  58. VerticalAlignment="Center"
  59. Margin="5, 0"
  60. Text="{Binding GyroDeadzone, StringFormat=\{0:0.00\}}" />
  61. </StackPanel>
  62. <Separator
  63. Height="1"
  64. Margin="0,5" />
  65. <CheckBox
  66. Margin="5"
  67. IsChecked="{Binding EnableCemuHookMotion}">
  68. <TextBlock
  69. Margin="0,3,0,0"
  70. VerticalAlignment="Center"
  71. Text="{locale:Locale ControllerSettingsMotionUseCemuhookCompatibleMotion}" />
  72. </CheckBox>
  73. </StackPanel>
  74. <Border
  75. Grid.Row="1"
  76. Padding="20,5"
  77. BorderBrush="{DynamicResource ThemeControlBorderColor}"
  78. BorderThickness="1"
  79. CornerRadius="5"
  80. HorizontalAlignment="Stretch">
  81. <Grid VerticalAlignment="Top">
  82. <Grid.RowDefinitions>
  83. <RowDefinition Height="Auto" />
  84. <RowDefinition Height="*" />
  85. </Grid.RowDefinitions>
  86. <StackPanel
  87. Grid.Row="1"
  88. HorizontalAlignment="Center"
  89. VerticalAlignment="Center"
  90. Orientation="Vertical">
  91. <StackPanel
  92. HorizontalAlignment="Center"
  93. VerticalAlignment="Center"
  94. Orientation="Horizontal">
  95. <TextBlock
  96. Margin="5"
  97. HorizontalAlignment="Center"
  98. VerticalAlignment="Center"
  99. Text="{locale:Locale ControllerSettingsMotionServerHost}" />
  100. <TextBox
  101. Height="30"
  102. MinWidth="100"
  103. MaxWidth="100"
  104. HorizontalAlignment="Center"
  105. VerticalAlignment="Center"
  106. Text="{Binding DsuServerHost, Mode=TwoWay}" />
  107. <TextBlock
  108. Margin="5"
  109. HorizontalAlignment="Center"
  110. VerticalAlignment="Center"
  111. Text=":" />
  112. <TextBox
  113. Height="30"
  114. HorizontalAlignment="Center"
  115. VerticalAlignment="Center"
  116. Text="{Binding DsuServerPort, Mode=TwoWay}" />
  117. </StackPanel>
  118. <StackPanel Orientation="Vertical">
  119. <Grid>
  120. <Grid.RowDefinitions>
  121. <RowDefinition />
  122. <RowDefinition />
  123. </Grid.RowDefinitions>
  124. <Grid.ColumnDefinitions>
  125. <ColumnDefinition />
  126. <ColumnDefinition />
  127. </Grid.ColumnDefinitions>
  128. <TextBlock
  129. Margin="0,10,0,0"
  130. VerticalAlignment="Center"
  131. Text="{locale:Locale ControllerSettingsMotionControllerSlot}" />
  132. <ui:NumberBox
  133. Grid.Row="0"
  134. Grid.Column="1"
  135. Name="CemuHookSlotUpDown"
  136. SmallChange="1"
  137. LargeChange="1"
  138. Maximum="4"
  139. Minimum="0"
  140. Value="{Binding Slot}" />
  141. <TextBlock
  142. Margin="0,10,0,0"
  143. Grid.Row="1"
  144. Grid.Column="0"
  145. VerticalAlignment="Center"
  146. Text="{locale:Locale ControllerSettingsMotionRightJoyConSlot}" />
  147. <ui:NumberBox
  148. Grid.Row="1"
  149. Grid.Column="1"
  150. Name="CemuHookRightJoyConSlotUpDown"
  151. SmallChange="1"
  152. LargeChange="1"
  153. Maximum="4"
  154. Minimum="0"
  155. Value="{Binding AltSlot}" />
  156. </Grid>
  157. </StackPanel>
  158. <CheckBox
  159. HorizontalAlignment="Center"
  160. IsChecked="{Binding MirrorInput, Mode=TwoWay}">
  161. <TextBlock
  162. HorizontalAlignment="Center"
  163. Text="{locale:Locale ControllerSettingsMotionMirrorInput}" />
  164. </CheckBox>
  165. </StackPanel>
  166. </Grid>
  167. </Border>
  168. </Grid>
  169. </UserControl>