MainWindow.axaml 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743
  1. <window:StyleableWindow
  2. x:Class="Ryujinx.Ava.Ui.Windows.MainWindow"
  3. xmlns="https://github.com/avaloniaui"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:controls="clr-namespace:Ryujinx.Ava.Ui.Controls"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:models="clr-namespace:Ryujinx.Ava.Ui.Models"
  10. xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
  11. xmlns:viewModels="clr-namespace:Ryujinx.Ava.Ui.ViewModels"
  12. xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows"
  13. Title="Ryujinx"
  14. Width="1280"
  15. Height="785"
  16. MinWidth="1024"
  17. MinHeight="680"
  18. d:DesignHeight="720"
  19. d:DesignWidth="1280"
  20. x:CompileBindings="True"
  21. x:DataType="viewModels:MainWindowViewModel"
  22. WindowStartupLocation="CenterScreen"
  23. mc:Ignorable="d">
  24. <Window.Styles>
  25. <Style Selector="TitleBar:fullscreen">
  26. <Setter Property="Background" Value="#000000" />
  27. </Style>
  28. </Window.Styles>
  29. <Design.DataContext>
  30. <viewModels:MainWindowViewModel />
  31. </Design.DataContext>
  32. <Window.Resources>
  33. <controls:BitmapArrayValueConverter x:Key="ByteImage" />
  34. </Window.Resources>
  35. <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="Auto" />
  38. <RowDefinition Height="*" />
  39. </Grid.RowDefinitions>
  40. <controls:OffscreenTextBox Name="HiddenTextBox" Grid.Row="0" />
  41. <StackPanel Grid.Row="0" IsVisible="False">
  42. <controls:HotKeyControl Name="FullscreenHotKey" Command="{ReflectionBinding ToggleFullscreen}" />
  43. <controls:HotKeyControl Name="FullscreenHotKey2" Command="{ReflectionBinding ToggleFullscreen}" />
  44. <controls:HotKeyControl Name="DockToggleHotKey" Command="{ReflectionBinding ToggleDockMode}" />
  45. <controls:HotKeyControl Name="ExitHotKey" Command="{ReflectionBinding ExitCurrentState}" />
  46. </StackPanel>
  47. <Grid
  48. Grid.Row="1"
  49. HorizontalAlignment="Stretch"
  50. VerticalAlignment="Stretch">
  51. <Grid.ColumnDefinitions>
  52. <ColumnDefinition Width="*" />
  53. </Grid.ColumnDefinitions>
  54. <Grid.RowDefinitions>
  55. <RowDefinition Height="Auto" />
  56. <RowDefinition Height="*" />
  57. <RowDefinition Height="Auto" />
  58. </Grid.RowDefinitions>
  59. <StackPanel
  60. Grid.Row="0"
  61. Margin="0"
  62. HorizontalAlignment="Stretch"
  63. VerticalAlignment="Stretch"
  64. IsVisible="{Binding ShowMenuAndStatusBar}"
  65. Orientation="Vertical">
  66. <DockPanel HorizontalAlignment="Stretch">
  67. <Menu
  68. Name="Menu"
  69. Height="35"
  70. Margin="0"
  71. HorizontalAlignment="Left">
  72. <Menu.ItemsPanel>
  73. <ItemsPanelTemplate>
  74. <DockPanel Margin="0" HorizontalAlignment="Stretch" />
  75. </ItemsPanelTemplate>
  76. </Menu.ItemsPanel>
  77. <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarFile}">
  78. <MenuItem
  79. Command="{ReflectionBinding OpenFile}"
  80. Header="{locale:Locale MenuBarFileOpenFromFile}"
  81. IsEnabled="{Binding EnableNonGameRunningControls}"
  82. ToolTip.Tip="{locale:Locale LoadApplicationFileTooltip}" />
  83. <MenuItem
  84. Command="{ReflectionBinding OpenFolder}"
  85. Header="{locale:Locale MenuBarFileOpenUnpacked}"
  86. IsEnabled="{Binding EnableNonGameRunningControls}"
  87. ToolTip.Tip="{locale:Locale LoadApplicationFolderTooltip}" />
  88. <MenuItem Header="{locale:Locale MenuBarFileOpenApplet}" IsEnabled="{Binding IsAppletMenuActive}">
  89. <MenuItem
  90. Command="{ReflectionBinding OpenMiiApplet}"
  91. Header="Mii Edit Applet"
  92. ToolTip.Tip="{locale:Locale MenuBarFileOpenAppletOpenMiiAppletToolTip}" />
  93. </MenuItem>
  94. <Separator />
  95. <MenuItem
  96. Command="{ReflectionBinding OpenRyujinxFolder}"
  97. Header="{locale:Locale MenuBarFileOpenEmuFolder}"
  98. ToolTip.Tip="{locale:Locale OpenRyujinxFolderTooltip}" />
  99. <MenuItem
  100. Command="{ReflectionBinding OpenLogsFolder}"
  101. Header="{locale:Locale MenuBarFileOpenLogsFolder}"
  102. ToolTip.Tip="{locale:Locale OpenRyujinxLogsTooltip}" />
  103. <Separator />
  104. <MenuItem
  105. Command="{ReflectionBinding CloseWindow}"
  106. Header="{locale:Locale MenuBarFileExit}"
  107. ToolTip.Tip="{locale:Locale ExitTooltip}" />
  108. </MenuItem>
  109. <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarOptions}">
  110. <MenuItem
  111. Command="{ReflectionBinding ToggleFullscreen}"
  112. Header="{locale:Locale MenuBarOptionsToggleFullscreen}"
  113. InputGesture="F11" />
  114. <MenuItem>
  115. <MenuItem.Icon>
  116. <CheckBox IsChecked="{Binding StartGamesInFullscreen, Mode=TwoWay}"
  117. MinWidth="250">
  118. <TextBlock Text="{locale:Locale MenuBarOptionsStartGamesInFullscreen}"/>
  119. </CheckBox>
  120. </MenuItem.Icon>
  121. </MenuItem>
  122. <MenuItem IsVisible="{Binding ShowConsoleVisible}">
  123. <MenuItem.Icon>
  124. <CheckBox IsChecked="{Binding ShowConsole, Mode=TwoWay}"
  125. MinWidth="250">
  126. <TextBlock Text="{locale:Locale MenuBarOptionsShowConsole}"/>
  127. </CheckBox>
  128. </MenuItem.Icon>
  129. </MenuItem>
  130. <Separator />
  131. <MenuItem Header="{locale:Locale MenuBarOptionsChangeLanguage}">
  132. <MenuItem
  133. Command="{ReflectionBinding ChangeLanguage}"
  134. CommandParameter="en_US"
  135. Header="American English" />
  136. <MenuItem
  137. Command="{ReflectionBinding ChangeLanguage}"
  138. CommandParameter="pt_BR"
  139. Header="Brazilian Portuguese" />
  140. <MenuItem
  141. Command="{ReflectionBinding ChangeLanguage}"
  142. CommandParameter="es_ES"
  143. Header="Castilian Spanish" />
  144. <MenuItem
  145. Command="{ReflectionBinding ChangeLanguage}"
  146. CommandParameter="fr_FR"
  147. Header="French" />
  148. <MenuItem
  149. Command="{ReflectionBinding ChangeLanguage}"
  150. CommandParameter="de_DE"
  151. Header="German" />
  152. <MenuItem
  153. Command="{ReflectionBinding ChangeLanguage}"
  154. CommandParameter="el_GR"
  155. Header="Greek" />
  156. <MenuItem
  157. Command="{ReflectionBinding ChangeLanguage}"
  158. CommandParameter="it_IT"
  159. Header="Italian" />
  160. <MenuItem
  161. Command="{ReflectionBinding ChangeLanguage}"
  162. CommandParameter="ko_KR"
  163. Header="Korean" />
  164. <MenuItem
  165. Command="{ReflectionBinding ChangeLanguage}"
  166. CommandParameter="ru_RU"
  167. Header="Russian" />
  168. <MenuItem
  169. Command="{ReflectionBinding ChangeLanguage}"
  170. CommandParameter="tr_TR"
  171. Header="Turkish" />
  172. <MenuItem
  173. Command="{ReflectionBinding ChangeLanguage}"
  174. CommandParameter="zh_CN"
  175. Header="Simplified Chinese" />
  176. <MenuItem
  177. Command="{ReflectionBinding ChangeLanguage}"
  178. CommandParameter="zh_TW"
  179. Header="Traditional Chinese (Taiwan)" />
  180. </MenuItem>
  181. <Separator />
  182. <MenuItem
  183. Command="{ReflectionBinding OpenSettings}"
  184. Header="{locale:Locale MenuBarOptionsSettings}"
  185. ToolTip.Tip="{locale:Locale OpenSettingsTooltip}" />
  186. <MenuItem
  187. Command="{ReflectionBinding ManageProfiles}"
  188. Header="{locale:Locale MenuBarOptionsManageUserProfiles}"
  189. IsEnabled="{Binding EnableNonGameRunningControls}"
  190. ToolTip.Tip="{locale:Locale OpenProfileManagerTooltip}" />
  191. </MenuItem>
  192. <MenuItem
  193. Name="ActionsMenuItem"
  194. VerticalAlignment="Center"
  195. Header="{locale:Locale MenuBarActions}"
  196. IsEnabled="{Binding IsGameRunning}">
  197. <MenuItem
  198. Click="PauseEmulation_Click"
  199. Header="{locale:Locale MenuBarOptionsPauseEmulation}"
  200. InputGesture="{Binding PauseKey}"
  201. IsEnabled="{Binding !IsPaused}"
  202. IsVisible="{Binding !IsPaused}" />
  203. <MenuItem
  204. Click="ResumeEmulation_Click"
  205. Header="{locale:Locale MenuBarOptionsResumeEmulation}"
  206. InputGesture="{Binding PauseKey}"
  207. IsEnabled="{Binding IsPaused}"
  208. IsVisible="{Binding IsPaused}" />
  209. <MenuItem
  210. Click="StopEmulation_Click"
  211. Header="{locale:Locale MenuBarOptionsStopEmulation}"
  212. InputGesture="Escape"
  213. IsEnabled="{Binding IsGameRunning}"
  214. ToolTip.Tip="{locale:Locale StopEmulationTooltip}" />
  215. <MenuItem Command="{ReflectionBinding SimulateWakeUpMessage}" Header="{locale:Locale MenuBarOptionsSimulateWakeUpMessage}" />
  216. <Separator />
  217. <MenuItem
  218. Name="ScanAmiiboMenuItem"
  219. AttachedToVisualTree="ScanAmiiboMenuItem_AttachedToVisualTree"
  220. Command="{ReflectionBinding OpenAmiiboWindow}"
  221. Header="{locale:Locale MenuBarActionsScanAmiibo}"
  222. IsEnabled="{Binding IsAmiiboRequested}" />
  223. <MenuItem
  224. Command="{ReflectionBinding TakeScreenshot}"
  225. Header="{locale:Locale MenuBarFileToolsTakeScreenshot}"
  226. InputGesture="{Binding ScreenshotKey}"
  227. IsEnabled="{Binding IsGameRunning}" />
  228. <MenuItem
  229. Command="{ReflectionBinding HideUi}"
  230. Header="{locale:Locale MenuBarFileToolsHideUi}"
  231. InputGesture="{Binding ShowUiKey}"
  232. IsEnabled="{Binding IsGameRunning}" />
  233. <MenuItem
  234. Command="{ReflectionBinding OpenCheatManagerForCurrentApp}"
  235. Header="{locale:Locale GameListContextMenuManageCheat}"
  236. IsEnabled="{Binding IsGameRunning}" />
  237. </MenuItem>
  238. <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarTools}">
  239. <MenuItem Header="{locale:Locale MenuBarToolsInstallFirmware}" IsEnabled="{Binding EnableNonGameRunningControls}">
  240. <MenuItem Command="{ReflectionBinding InstallFirmwareFromFile}" Header="{locale:Locale MenuBarFileToolsInstallFirmwareFromFile}" />
  241. <MenuItem Command="{ReflectionBinding InstallFirmwareFromFolder}" Header="{locale:Locale MenuBarFileToolsInstallFirmwareFromDirectory}" />
  242. </MenuItem>
  243. </MenuItem>
  244. <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarHelp}">
  245. <MenuItem
  246. Name="UpdateMenuItem"
  247. Command="{ReflectionBinding CheckForUpdates}"
  248. Header="{locale:Locale MenuBarHelpCheckForUpdates}"
  249. ToolTip.Tip="{locale:Locale CheckUpdatesTooltip}" />
  250. <Separator />
  251. <MenuItem
  252. Command="{ReflectionBinding OpenAboutWindow}"
  253. Header="{locale:Locale MenuBarHelpAbout}"
  254. ToolTip.Tip="{locale:Locale OpenAboutTooltip}" />
  255. </MenuItem>
  256. </Menu>
  257. </DockPanel>
  258. </StackPanel>
  259. <ContentControl
  260. Name="Content"
  261. Grid.Row="1"
  262. Padding="0"
  263. HorizontalAlignment="Stretch"
  264. VerticalAlignment="Stretch"
  265. BorderBrush="{DynamicResource ThemeControlBorderColor}"
  266. BorderThickness="0,0,0,0"
  267. DockPanel.Dock="Top"
  268. IsVisible="{Binding ShowContent}">
  269. <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  270. <Grid.RowDefinitions>
  271. <RowDefinition Height="Auto" />
  272. <RowDefinition Height="*" />
  273. </Grid.RowDefinitions>
  274. <DockPanel
  275. Grid.Row="0"
  276. Margin="0,0,0,5"
  277. HorizontalAlignment="Stretch">
  278. <Button
  279. Width="40"
  280. MinWidth="40"
  281. Margin="5,2,0,2"
  282. VerticalAlignment="Stretch"
  283. Command="{ReflectionBinding SetListMode}"
  284. IsEnabled="{Binding IsGrid}">
  285. <ui:FontIcon
  286. Margin="0"
  287. HorizontalAlignment="Stretch"
  288. VerticalAlignment="Center"
  289. FontFamily="avares://FluentAvalonia/Fonts#Symbols"
  290. Glyph="{controls:GlyphValueConverter List}" />
  291. </Button>
  292. <Button
  293. Width="40"
  294. MinWidth="40"
  295. Margin="5,2,5,2"
  296. VerticalAlignment="Stretch"
  297. Command="{ReflectionBinding SetGridMode}"
  298. IsEnabled="{Binding IsList}">
  299. <ui:FontIcon
  300. Margin="0"
  301. HorizontalAlignment="Stretch"
  302. VerticalAlignment="Center"
  303. FontFamily="avares://FluentAvalonia/Fonts#Symbols"
  304. Glyph="{controls:GlyphValueConverter Grid}" />
  305. </Button>
  306. <TextBlock
  307. Margin="10,0"
  308. VerticalAlignment="Center"
  309. Text="{locale:Locale IconSize}"
  310. ToolTip.Tip="{locale:Locale IconSizeTooltip}" />
  311. <Slider
  312. Width="150"
  313. Height="35"
  314. Margin="5,-10,5,0"
  315. VerticalAlignment="Center"
  316. IsSnapToTickEnabled="True"
  317. Maximum="4"
  318. Minimum="1"
  319. TickFrequency="1"
  320. ToolTip.Tip="{locale:Locale IconSizeTooltip}"
  321. Value="{Binding GridSizeScale}" />
  322. <CheckBox
  323. Margin="0"
  324. VerticalAlignment="Center"
  325. IsChecked="{Binding ShowNames, Mode=TwoWay}"
  326. IsVisible="{Binding IsGrid}">
  327. <TextBlock Margin="5,3,0,0" Text="{locale:Locale CommonShowNames}" />
  328. </CheckBox>
  329. <TextBox
  330. Name="SearchBox"
  331. MinWidth="200"
  332. Margin="5,0,5,0"
  333. HorizontalAlignment="Right"
  334. VerticalAlignment="Center"
  335. DockPanel.Dock="Right"
  336. KeyUp="SearchBox_OnKeyUp"
  337. Text="{Binding SearchText}"
  338. Watermark="{locale:Locale MenuSearch}" />
  339. <ui:DropDownButton
  340. Width="150"
  341. HorizontalAlignment="Right"
  342. VerticalAlignment="Center"
  343. Content="{Binding SortName}"
  344. DockPanel.Dock="Right">
  345. <ui:DropDownButton.Flyout>
  346. <Flyout Placement="Bottom">
  347. <StackPanel
  348. Margin="0"
  349. HorizontalAlignment="Stretch"
  350. Orientation="Vertical">
  351. <StackPanel>
  352. <RadioButton
  353. Checked="Sort_Checked"
  354. Content="{locale:Locale CommonFavorite}"
  355. GroupName="Sort"
  356. IsChecked="{Binding IsSortedByFavorite, Mode=OneTime}"
  357. Tag="Favorite" />
  358. <RadioButton
  359. Checked="Sort_Checked"
  360. Content="{locale:Locale GameListHeaderApplication}"
  361. GroupName="Sort"
  362. IsChecked="{Binding IsSortedByTitle, Mode=OneTime}"
  363. Tag="Title" />
  364. <RadioButton
  365. Checked="Sort_Checked"
  366. Content="{locale:Locale GameListHeaderDeveloper}"
  367. GroupName="Sort"
  368. IsChecked="{Binding IsSortedByDeveloper, Mode=OneTime}"
  369. Tag="Developer" />
  370. <RadioButton
  371. Checked="Sort_Checked"
  372. Content="{locale:Locale GameListHeaderTimePlayed}"
  373. GroupName="Sort"
  374. IsChecked="{Binding IsSortedByTimePlayed, Mode=OneTime}"
  375. Tag="TotalTimePlayed" />
  376. <RadioButton
  377. Checked="Sort_Checked"
  378. Content="{locale:Locale GameListHeaderLastPlayed}"
  379. GroupName="Sort"
  380. IsChecked="{Binding IsSortedByLastPlayed, Mode=OneTime}"
  381. Tag="LastPlayed" />
  382. <RadioButton
  383. Checked="Sort_Checked"
  384. Content="{locale:Locale GameListHeaderFileExtension}"
  385. GroupName="Sort"
  386. IsChecked="{Binding IsSortedByType, Mode=OneTime}"
  387. Tag="FileType" />
  388. <RadioButton
  389. Checked="Sort_Checked"
  390. Content="{locale:Locale GameListHeaderFileSize}"
  391. GroupName="Sort"
  392. IsChecked="{Binding IsSortedBySize, Mode=OneTime}"
  393. Tag="FileSize" />
  394. <RadioButton
  395. Checked="Sort_Checked"
  396. Content="{locale:Locale GameListHeaderPath}"
  397. GroupName="Sort"
  398. IsChecked="{Binding IsSortedByPath, Mode=OneTime}"
  399. Tag="Path" />
  400. </StackPanel>
  401. <Border
  402. Width="60"
  403. Height="2"
  404. Margin="5"
  405. HorizontalAlignment="Stretch"
  406. BorderBrush="White"
  407. BorderThickness="0,1,0,0">
  408. <Separator Height="0" HorizontalAlignment="Stretch" />
  409. </Border>
  410. <RadioButton
  411. Checked="Order_Checked"
  412. Content="{locale:Locale OrderAscending}"
  413. GroupName="Order"
  414. IsChecked="{Binding IsAscending, Mode=OneTime}"
  415. Tag="Ascending" />
  416. <RadioButton
  417. Checked="Order_Checked"
  418. Content="{locale:Locale OrderDescending}"
  419. GroupName="Order"
  420. IsChecked="{Binding !IsAscending, Mode=OneTime}"
  421. Tag="Descending" />
  422. </StackPanel>
  423. </Flyout>
  424. </ui:DropDownButton.Flyout>
  425. </ui:DropDownButton>
  426. <TextBlock
  427. Margin="10,0"
  428. HorizontalAlignment="Right"
  429. VerticalAlignment="Center"
  430. DockPanel.Dock="Right"
  431. Text="{locale:Locale CommonSort}" />
  432. </DockPanel>
  433. <controls:GameListView
  434. x:Name="GameList"
  435. Grid.Row="1"
  436. HorizontalAlignment="Stretch"
  437. VerticalAlignment="Stretch"
  438. HorizontalContentAlignment="Stretch"
  439. VerticalContentAlignment="Stretch"
  440. IsVisible="{Binding IsList}" />
  441. <controls:GameGridView
  442. x:Name="GameGrid"
  443. Grid.Row="1"
  444. HorizontalAlignment="Stretch"
  445. VerticalAlignment="Stretch"
  446. HorizontalContentAlignment="Stretch"
  447. VerticalContentAlignment="Stretch"
  448. IsVisible="{Binding IsGrid}" />
  449. </Grid>
  450. </ContentControl>
  451. <Grid
  452. Grid.Row="1"
  453. HorizontalAlignment="Stretch"
  454. VerticalAlignment="Stretch"
  455. Background="{DynamicResource ThemeContentBackgroundColor}"
  456. IsVisible="{Binding ShowLoadProgress}"
  457. ZIndex="1000">
  458. <Grid
  459. Margin="40"
  460. HorizontalAlignment="Center"
  461. VerticalAlignment="Center"
  462. IsVisible="{Binding ShowLoadProgress}">
  463. <Grid.ColumnDefinitions>
  464. <ColumnDefinition Width="Auto" />
  465. <ColumnDefinition Width="*" />
  466. </Grid.ColumnDefinitions>
  467. <Border
  468. Grid.RowSpan="2"
  469. Grid.Column="0"
  470. Width="256"
  471. Height="256"
  472. Margin="10"
  473. Padding="4"
  474. BorderBrush="Black"
  475. BorderThickness="2"
  476. BoxShadow="4 4 32 8 #40000000"
  477. CornerRadius="3"
  478. IsVisible="{Binding ShowLoadProgress}">
  479. <Image
  480. Width="256"
  481. Height="256"
  482. IsVisible="{Binding ShowLoadProgress}"
  483. Source="{Binding SelectedIcon, Converter={StaticResource ByteImage}}" />
  484. </Border>
  485. <Grid
  486. Grid.Column="1"
  487. HorizontalAlignment="Stretch"
  488. VerticalAlignment="Center"
  489. IsVisible="{Binding ShowLoadProgress}">
  490. <Grid.RowDefinitions>
  491. <RowDefinition Height="Auto" />
  492. <RowDefinition Height="Auto" />
  493. <RowDefinition Height="Auto" />
  494. </Grid.RowDefinitions>
  495. <TextBlock
  496. Grid.Row="0"
  497. Margin="10"
  498. FontSize="30"
  499. FontWeight="Bold"
  500. IsVisible="{Binding ShowLoadProgress}"
  501. Text="{Binding LoadHeading}"
  502. TextAlignment="Left"
  503. TextWrapping="Wrap" />
  504. <Border
  505. Grid.Row="1"
  506. Margin="10"
  507. Padding="0"
  508. HorizontalAlignment="Stretch"
  509. BorderBrush="{Binding ProgressBarBackgroundColor}"
  510. BorderThickness="1"
  511. ClipToBounds="True"
  512. CornerRadius="5"
  513. IsVisible="{Binding ShowLoadProgress}">
  514. <ProgressBar
  515. Height="10"
  516. MinWidth="500"
  517. Margin="0"
  518. Padding="0"
  519. HorizontalAlignment="Stretch"
  520. Background="{Binding ProgressBarBackgroundColor}"
  521. ClipToBounds="True"
  522. CornerRadius="5"
  523. Foreground="{Binding ProgressBarForegroundColor}"
  524. IsIndeterminate="{Binding IsLoadingIndeterminate}"
  525. IsVisible="{Binding ShowLoadProgress}"
  526. Maximum="{Binding ProgressMaximum}"
  527. Minimum="0"
  528. Value="{Binding ProgressValue}" />
  529. </Border>
  530. <TextBlock
  531. Grid.Row="2"
  532. Margin="10"
  533. FontSize="18"
  534. IsVisible="{Binding ShowLoadProgress}"
  535. Text="{Binding CacheLoadStatus}"
  536. TextAlignment="Left" />
  537. </Grid>
  538. </Grid>
  539. </Grid>
  540. <Grid
  541. Name="StatusBar"
  542. Grid.Row="2"
  543. Height="30"
  544. Margin="0,0"
  545. HorizontalAlignment="Stretch"
  546. VerticalAlignment="Bottom"
  547. Background="{DynamicResource ThemeContentBackgroundColor}"
  548. DockPanel.Dock="Bottom"
  549. IsVisible="{Binding ShowMenuAndStatusBar}">
  550. <Grid.ColumnDefinitions>
  551. <ColumnDefinition Width="Auto" />
  552. <ColumnDefinition Width="Auto" />
  553. <ColumnDefinition Width="*" />
  554. <ColumnDefinition Width="Auto" />
  555. </Grid.ColumnDefinitions>
  556. <StackPanel
  557. Grid.Column="0"
  558. Margin="10,0"
  559. VerticalAlignment="Center"
  560. IsVisible="{Binding EnableNonGameRunningControls}">
  561. <Grid Margin="0">
  562. <Grid.ColumnDefinitions>
  563. <ColumnDefinition Width="Auto" />
  564. <ColumnDefinition Width="Auto" />
  565. <ColumnDefinition />
  566. </Grid.ColumnDefinitions>
  567. <Button
  568. Width="25"
  569. Height="25"
  570. MinWidth="0"
  571. Margin="0,0,5,0"
  572. VerticalAlignment="Center"
  573. Background="Transparent"
  574. Command="{ReflectionBinding LoadApplications}">
  575. <ui:SymbolIcon
  576. Width="50"
  577. Height="100"
  578. Symbol="Refresh" />
  579. </Button>
  580. <TextBlock
  581. Name="LoadStatus"
  582. Grid.Column="1"
  583. Margin="0,0,5,0"
  584. VerticalAlignment="Center"
  585. IsVisible="{Binding EnableNonGameRunningControls}"
  586. Text="{locale:Locale StatusBarGamesLoaded}" />
  587. <ProgressBar
  588. Name="LoadProgressBar"
  589. Grid.Column="2"
  590. Height="6"
  591. VerticalAlignment="Center"
  592. Foreground="{DynamicResource HighlightColor}"
  593. IsVisible="{Binding EnableNonGameRunningControls}"
  594. Maximum="{Binding StatusBarProgressMaximum}"
  595. Value="{Binding StatusBarProgressValue}" />
  596. </Grid>
  597. </StackPanel>
  598. <StackPanel
  599. Grid.Column="1"
  600. Margin="10,0"
  601. HorizontalAlignment="Left"
  602. VerticalAlignment="Center"
  603. IsVisible="{Binding IsGameRunning}"
  604. Orientation="Horizontal">
  605. <TextBlock
  606. Name="VsyncStatus"
  607. Margin="0,0,5,0"
  608. HorizontalAlignment="Left"
  609. VerticalAlignment="Center"
  610. Foreground="{Binding VsyncColor}"
  611. IsVisible="{Binding !ShowLoadProgress}"
  612. PointerReleased="VsyncStatus_PointerReleased"
  613. Text="VSync"
  614. TextAlignment="Left" />
  615. <Border
  616. Width="2"
  617. Height="12"
  618. Margin="2,0"
  619. BorderBrush="Gray"
  620. BorderThickness="1"
  621. IsVisible="{Binding !ShowLoadProgress}" />
  622. <TextBlock
  623. Name="DockedStatus"
  624. Margin="5,0,5,0"
  625. HorizontalAlignment="Left"
  626. VerticalAlignment="Center"
  627. IsVisible="{Binding !ShowLoadProgress}"
  628. PointerReleased="DockedStatus_PointerReleased"
  629. Text="{Binding DockedStatusText}"
  630. TextAlignment="Left" />
  631. <Border
  632. Width="2"
  633. Height="12"
  634. Margin="2,0"
  635. BorderBrush="Gray"
  636. BorderThickness="1"
  637. IsVisible="{Binding !ShowLoadProgress}" />
  638. <TextBlock
  639. Name="AspectRatioStatus"
  640. Margin="5,0,5,0"
  641. HorizontalAlignment="Left"
  642. VerticalAlignment="Center"
  643. IsVisible="{Binding !ShowLoadProgress}"
  644. PointerReleased="AspectRatioStatus_PointerReleased"
  645. Text="{Binding AspectRatioStatusText}"
  646. TextAlignment="Left" />
  647. <Border
  648. Width="2"
  649. Height="12"
  650. Margin="2,0"
  651. BorderBrush="Gray"
  652. BorderThickness="1"
  653. IsVisible="{Binding !ShowLoadProgress}" />
  654. <ui:ToggleSplitButton
  655. Name="VolumeStatus"
  656. Margin="-2,0,-3,0"
  657. Padding="5,0,0,5"
  658. HorizontalAlignment="Left"
  659. VerticalAlignment="Center"
  660. Background="{DynamicResource ThemeContentBackgroundColor}"
  661. BorderBrush="{DynamicResource ThemeContentBackgroundColor}"
  662. Content="{Binding VolumeStatusText}"
  663. IsChecked="{Binding VolumeMuted}"
  664. IsVisible="{Binding !ShowLoadProgress}">
  665. <ui:ToggleSplitButton.Flyout>
  666. <Flyout Placement="Bottom" ShowMode="TransientWithDismissOnPointerMoveAway">
  667. <Grid Margin="0">
  668. <Slider
  669. Width="150"
  670. Margin="0"
  671. Padding="0"
  672. IsSnapToTickEnabled="True"
  673. LargeChange="0.05"
  674. Maximum="1"
  675. Minimum="0"
  676. SmallChange="0.01"
  677. TickFrequency="0.05"
  678. ToolTip.Tip="{locale:Locale AudioVolumeTooltip}"
  679. Value="{Binding Volume}" />
  680. </Grid>
  681. </Flyout>
  682. </ui:ToggleSplitButton.Flyout>
  683. </ui:ToggleSplitButton>
  684. <Border
  685. Width="2"
  686. Height="12"
  687. Margin="2,0"
  688. BorderBrush="Gray"
  689. BorderThickness="1"
  690. IsVisible="{Binding !ShowLoadProgress}" />
  691. <TextBlock
  692. Margin="5,0,5,0"
  693. HorizontalAlignment="Left"
  694. VerticalAlignment="Center"
  695. IsVisible="{Binding !ShowLoadProgress}"
  696. Text="{Binding GameStatusText}"
  697. TextAlignment="Left" />
  698. <Border
  699. Width="2"
  700. Height="12"
  701. Margin="2,0"
  702. BorderBrush="Gray"
  703. BorderThickness="1"
  704. IsVisible="{Binding !ShowLoadProgress}" />
  705. <TextBlock
  706. Margin="5,0,5,0"
  707. HorizontalAlignment="Left"
  708. VerticalAlignment="Center"
  709. IsVisible="{Binding !ShowLoadProgress}"
  710. Text="{Binding FifoStatusText}"
  711. TextAlignment="Left" />
  712. <Border
  713. Width="2"
  714. Height="12"
  715. Margin="2,0"
  716. BorderBrush="Gray"
  717. BorderThickness="1"
  718. IsVisible="{Binding !ShowLoadProgress}" />
  719. <TextBlock
  720. Margin="5,0,5,0"
  721. HorizontalAlignment="Left"
  722. VerticalAlignment="Center"
  723. IsVisible="{Binding !ShowLoadProgress}"
  724. Text="{Binding GpuStatusText}"
  725. TextAlignment="Left" />
  726. </StackPanel>
  727. <StackPanel
  728. Grid.Column="3"
  729. Margin="10,0"
  730. VerticalAlignment="Center"
  731. IsVisible="{Binding ShowFirmwareStatus}"
  732. Orientation="Horizontal">
  733. <TextBlock
  734. Name="FirmwareStatus"
  735. Margin="0"
  736. HorizontalAlignment="Right"
  737. VerticalAlignment="Center"
  738. Text="{locale:Locale StatusBarSystemVersion}" />
  739. </StackPanel>
  740. </Grid>
  741. </Grid>
  742. </Grid>
  743. </window:StyleableWindow>