MainWindow.axaml 41 KB

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