SettingsSystemView.axaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <UserControl
  2. x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsSystemView"
  3. xmlns="https://github.com/avaloniaui"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
  8. xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
  9. xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
  10. xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
  11. mc:Ignorable="d"
  12. x:DataType="viewModels:SettingsViewModel">
  13. <Design.DataContext>
  14. <viewModels:SettingsViewModel />
  15. </Design.DataContext>
  16. <ScrollViewer
  17. Name="SystemPage"
  18. HorizontalAlignment="Stretch"
  19. VerticalAlignment="Stretch"
  20. HorizontalScrollBarVisibility="Disabled"
  21. VerticalScrollBarVisibility="Auto">
  22. <Border Classes="settings">
  23. <StackPanel
  24. Margin="10"
  25. HorizontalAlignment="Stretch"
  26. Orientation="Vertical"
  27. Spacing="10">
  28. <TextBlock
  29. Classes="h1"
  30. Text="{ext:Locale SettingsTabSystemCore}" />
  31. <StackPanel
  32. Margin="10,0,0,0"
  33. Orientation="Vertical">
  34. <StackPanel
  35. Margin="0,0,0,10"
  36. Orientation="Horizontal">
  37. <TextBlock
  38. VerticalAlignment="Center"
  39. Text="{ext:Locale SettingsTabSystemSystemRegion}"
  40. Width="250" />
  41. <ComboBox
  42. SelectedIndex="{Binding Region}"
  43. ToolTip.Tip="{ext:Locale RegionTooltip}"
  44. HorizontalContentAlignment="Left"
  45. Width="350">
  46. <ComboBoxItem>
  47. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionJapan}" />
  48. </ComboBoxItem>
  49. <ComboBoxItem>
  50. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionUSA}" />
  51. </ComboBoxItem>
  52. <ComboBoxItem>
  53. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionEurope}" />
  54. </ComboBoxItem>
  55. <ComboBoxItem>
  56. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionAustralia}" />
  57. </ComboBoxItem>
  58. <ComboBoxItem>
  59. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionChina}" />
  60. </ComboBoxItem>
  61. <ComboBoxItem>
  62. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionKorea}" />
  63. </ComboBoxItem>
  64. <ComboBoxItem>
  65. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionTaiwan}" />
  66. </ComboBoxItem>
  67. </ComboBox>
  68. </StackPanel>
  69. <StackPanel
  70. Margin="0,0,0,10"
  71. Orientation="Horizontal">
  72. <TextBlock
  73. VerticalAlignment="Center"
  74. Text="{ext:Locale SettingsTabSystemSystemLanguage}"
  75. ToolTip.Tip="{ext:Locale LanguageTooltip}"
  76. Width="250" />
  77. <ComboBox
  78. SelectedIndex="{Binding Language}"
  79. ToolTip.Tip="{ext:Locale LanguageTooltip}"
  80. HorizontalContentAlignment="Left"
  81. Width="350">
  82. <ComboBoxItem>
  83. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageJapanese}" />
  84. </ComboBoxItem>
  85. <ComboBoxItem>
  86. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageAmericanEnglish}" />
  87. </ComboBoxItem>
  88. <ComboBoxItem>
  89. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageFrench}" />
  90. </ComboBoxItem>
  91. <ComboBoxItem>
  92. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageGerman}" />
  93. </ComboBoxItem>
  94. <ComboBoxItem>
  95. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageItalian}" />
  96. </ComboBoxItem>
  97. <ComboBoxItem>
  98. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageSpanish}" />
  99. </ComboBoxItem>
  100. <ComboBoxItem>
  101. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageChinese}" />
  102. </ComboBoxItem>
  103. <ComboBoxItem>
  104. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageKorean}" />
  105. </ComboBoxItem>
  106. <ComboBoxItem>
  107. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageDutch}" />
  108. </ComboBoxItem>
  109. <ComboBoxItem>
  110. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguagePortuguese}" />
  111. </ComboBoxItem>
  112. <ComboBoxItem>
  113. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageRussian}" />
  114. </ComboBoxItem>
  115. <ComboBoxItem>
  116. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageTaiwanese}" />
  117. </ComboBoxItem>
  118. <ComboBoxItem>
  119. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageBritishEnglish}" />
  120. </ComboBoxItem>
  121. <ComboBoxItem>
  122. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageCanadianFrench}" />
  123. </ComboBoxItem>
  124. <ComboBoxItem>
  125. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageLatinAmericanSpanish}" />
  126. </ComboBoxItem>
  127. <ComboBoxItem>
  128. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageSimplifiedChinese}" />
  129. </ComboBoxItem>
  130. <ComboBoxItem>
  131. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageTraditionalChinese}" />
  132. </ComboBoxItem>
  133. <ComboBoxItem>
  134. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageBrazilianPortuguese}" />
  135. </ComboBoxItem>
  136. </ComboBox>
  137. </StackPanel>
  138. <StackPanel
  139. Margin="0,0,0,10"
  140. Orientation="Horizontal">
  141. <TextBlock
  142. VerticalAlignment="Center"
  143. Text="{ext:Locale SettingsTabSystemSystemTimeZone}"
  144. ToolTip.Tip="{ext:Locale TimezoneTooltip}"
  145. Width="250" />
  146. <AutoCompleteBox
  147. Name="TimeZoneBox"
  148. Width="350"
  149. MaxDropDownHeight="500"
  150. FilterMode="Contains"
  151. ItemsSource="{Binding TimeZones}"
  152. SelectionChanged="TimeZoneBox_OnSelectionChanged"
  153. Text="{Binding Path=TimeZone, Mode=OneWay}"
  154. TextChanged="TimeZoneBox_OnTextChanged"
  155. ToolTip.Tip="{ext:Locale TimezoneTooltip}"
  156. ValueMemberBinding="{Binding Mode=OneWay, Converter={x:Static helpers:TimeZoneConverter.Instance}}" />
  157. </StackPanel>
  158. <StackPanel
  159. IsEnabled="{Binding !IsGameTitleNotNull}"
  160. Opacity="{Binding PanelOpacity}"
  161. Margin="0,0,0,10"
  162. Orientation="Horizontal">
  163. <TextBlock
  164. VerticalAlignment="Center"
  165. Text="{ext:Locale SettingsTabSystemSystemTime}"
  166. ToolTip.Tip="{ext:Locale TimeTooltip}"
  167. Width="250"/>
  168. <DatePicker
  169. VerticalAlignment="Center"
  170. IsEnabled="{Binding !MatchSystemTime}"
  171. SelectedDate="{Binding CurrentDate}"
  172. ToolTip.Tip="{ext:Locale TimeTooltip}"
  173. Width="350" />
  174. <TextBlock Classes="globalConfigMarker" IsVisible="{Binding IsGameTitleNotNull}"/>
  175. </StackPanel>
  176. <StackPanel
  177. IsEnabled="{Binding !IsGameTitleNotNull}"
  178. Opacity="{Binding PanelOpacity}"
  179. Margin="250,0,0,10"
  180. Orientation="Horizontal">
  181. <TimePicker
  182. VerticalAlignment="Center"
  183. ClockIdentifier="24HourClock"
  184. IsEnabled="{Binding !MatchSystemTime}"
  185. SelectedTime="{Binding CurrentTime}"
  186. Width="350"
  187. ToolTip.Tip="{ext:Locale TimeTooltip}" />
  188. <TextBlock Classes="globalConfigMarker" IsVisible="{Binding IsGameTitleNotNull}"/>
  189. </StackPanel>
  190. <StackPanel
  191. IsEnabled="{Binding !IsGameTitleNotNull}"
  192. Opacity="{Binding PanelOpacity}"
  193. Orientation="Horizontal">
  194. <TextBlock
  195. VerticalAlignment="Center"
  196. Text="{ext:Locale SettingsTabSystemSystemTimeMatch}"
  197. ToolTip.Tip="{ext:Locale MatchTimeTooltip}"
  198. Width="250"/>
  199. <CheckBox
  200. VerticalAlignment="Center"
  201. IsChecked="{Binding MatchSystemTime}"
  202. ToolTip.Tip="{ext:Locale MatchTimeTooltip}"/>
  203. <TextBlock Classes="globalConfigMarker" IsVisible="{Binding IsGameTitleNotNull}"/>
  204. </StackPanel>
  205. <Separator />
  206. <StackPanel Margin="0,10,0,10"
  207. Orientation="Horizontal">
  208. <TextBlock
  209. VerticalAlignment="Center"
  210. Text="{ext:Locale SettingsTabSystemVSyncMode}"
  211. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltip}"
  212. Width="250" />
  213. <ComboBox
  214. IsVisible="{Binding EnableCustomVSyncInterval}"
  215. SelectedIndex="{Binding VSyncMode}"
  216. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltipCustom}"
  217. HorizontalContentAlignment="Left"
  218. Width="350">
  219. <ComboBoxItem>
  220. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeSwitch}" />
  221. </ComboBoxItem>
  222. <ComboBoxItem>
  223. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeUnbounded}" />
  224. </ComboBoxItem>
  225. <ComboBoxItem>
  226. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeCustom}" />
  227. </ComboBoxItem>
  228. </ComboBox>
  229. <ComboBox
  230. IsVisible="{Binding !EnableCustomVSyncInterval}"
  231. SelectedIndex="{Binding VSyncMode}"
  232. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltip}"
  233. HorizontalContentAlignment="Left"
  234. Width="350">
  235. <ComboBoxItem>
  236. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeSwitch}" />
  237. </ComboBoxItem>
  238. <ComboBoxItem>
  239. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeUnbounded}" />
  240. </ComboBoxItem>
  241. </ComboBox>
  242. </StackPanel>
  243. <StackPanel IsVisible="{Binding EnableCustomVSyncInterval}"
  244. Margin="0,0,0,10"
  245. Orientation="Horizontal">
  246. <TextBlock
  247. VerticalAlignment="Center"
  248. Text="{ext:Locale SettingsTabSystemCustomVSyncIntervalPercentage}"
  249. ToolTip.Tip="{ext:Locale SettingsTabSystemCustomVSyncIntervalValueTooltip}"
  250. Width="250" />
  251. <Slider Value="{Binding CustomVSyncIntervalPercentageProxy}"
  252. ToolTip.Tip="{ext:Locale SettingsTabSystemCustomVSyncIntervalSliderTooltip}"
  253. MinWidth="175"
  254. Margin="10,-3,0,0"
  255. Height="32"
  256. Padding="0,-5"
  257. TickFrequency="1"
  258. IsSnapToTickEnabled="True"
  259. LargeChange="10"
  260. SmallChange="1"
  261. VerticalAlignment="Center"
  262. Minimum="10"
  263. Maximum="400" />
  264. <TextBlock Margin="5,0"
  265. Width="40"
  266. Text="{Binding CustomVSyncIntervalPercentageText}"/>
  267. </StackPanel>
  268. <CheckBox IsChecked="{Binding EnableFsIntegrityChecks}">
  269. <TextBlock
  270. Text="{ext:Locale SettingsTabSystemEnableFsIntegrityChecks}"
  271. ToolTip.Tip="{ext:Locale FsIntegrityToggleTooltip}" />
  272. </CheckBox>
  273. </StackPanel>
  274. <Separator Height="1" />
  275. <StackPanel
  276. Orientation="Vertical"
  277. Spacing="5">
  278. <TextBlock
  279. Classes="h1"
  280. Text="{ext:Locale SettingsTabSystemHacks}" />
  281. <TextBlock
  282. Foreground="{DynamicResource SecondaryTextColor}"
  283. TextDecorations="Underline"
  284. Text="{ext:Locale SettingsTabSystemHacksNote}" />
  285. </StackPanel>
  286. <StackPanel
  287. Margin="10,0,0,0"
  288. Orientation="Horizontal">
  289. <TextBlock
  290. VerticalAlignment="Center"
  291. Text="{ext:Locale SettingsTabSystemDramSize}"
  292. Width="250" />
  293. <ComboBox
  294. SelectedIndex="{Binding DramSize}"
  295. ToolTip.Tip="{ext:Locale DRamTooltip}"
  296. HorizontalContentAlignment="Left"
  297. Width="350">
  298. <ComboBoxItem>
  299. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize4GiB}" />
  300. </ComboBoxItem>
  301. <ComboBoxItem>
  302. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize6GiB}" />
  303. </ComboBoxItem>
  304. <ComboBoxItem>
  305. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize8GiB}" />
  306. </ComboBoxItem>
  307. <ComboBoxItem>
  308. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize12GiB}" />
  309. </ComboBoxItem>
  310. </ComboBox>
  311. </StackPanel>
  312. <StackPanel
  313. Margin="10,0,0,0"
  314. HorizontalAlignment="Stretch"
  315. Orientation="Vertical">
  316. <CheckBox
  317. IsChecked="{Binding IgnoreMissingServices}"
  318. ToolTip.Tip="{ext:Locale IgnoreMissingServicesTooltip}">
  319. <TextBlock Text="{ext:Locale SettingsTabSystemIgnoreMissingServices}" />
  320. </CheckBox>
  321. <CheckBox
  322. IsChecked="{Binding IgnoreApplet}"
  323. ToolTip.Tip="{ext:Locale IgnoreControllerAppletTooltip}">
  324. <TextBlock Text="{ext:Locale SettingsTabSystemIgnoreControllerApplet}" />
  325. </CheckBox>
  326. <CheckBox
  327. IsChecked="{Binding EnableCustomVSyncInterval}"
  328. ToolTip.Tip="{ext:Locale SettingsTabSystemEnableCustomVSyncIntervalTooltip}">
  329. <TextBlock Text="{ext:Locale SettingsTabSystemEnableCustomVSyncInterval}" />
  330. </CheckBox>
  331. </StackPanel>
  332. </StackPanel>
  333. </Border>
  334. </ScrollViewer>
  335. </UserControl>