MainWindow.axaml 37 KB

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