MainWindow.axaml 40 KB

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