mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-15 08:49:15 +00:00
Ayyyy, welcome to the UI: File Menu → General Improvements PR!
Wooo, we progressing smoothly!
This PR introduces small visual and "feature" improvements to the `File` menu.
### LOCALISATION:
* **Fractured:** More locales:
* `Dialog_ContentLoading.json` - content loading dialogs (Updates/DLC)
* `Dialog_FileTypeAssociations` - file association dialogs
* `Dialog_FileMenu` - File menu dialog strings (complements `MenuBar_File.json`)
* **Added:** Additional entires to `Error.json`
* **Populated:** `MenuBar_File.json`
### FILE MENU:
* **Added:** Keyboard shortcuts to `Load Application` and `Load Unpacked Game`
* Cmd + O/Ctrl + O and Cmd + Shift + O/Ctrl + Shift + O for macOS and other OS, respectively.
* While many users rely on autoloaded game directories, manually opening content remains a common workflow (for those that don't rely on autoload directories).
* **Merged:** `Load Title Updates` and `Load DLC` → `Load Updates/DLC`
* Both actions follow the same workflow: selecting one or more directories and allowing Ryujinx to load the content.
* To reduce redundancy, they have been consolidated into a single menu item that loads both Updates and DLC simultaneously, mirroring the behavior of the existing autoload functionality.
* As part of this change, Title Updates has been simplified to Updates for consistency with the rest of the UI. The remaining reference in the Game List context menu has also been updated from `Manage Title Updates` to `Manage Updates`.
* **Added/Updated:** File picker titles for content loading actions
* `Load Application`: Select a Switch application file to load
* `Load Unpacked Game`: Select a folder containing an unpacked Switch application to load
* `Load Updates/DLC`: Select one or more folders to bulk load updates and DLC from
* **Improved:** `Associate File Types` and `Remove File Type Associations` (initially moved to the `File` menu in #42)
* These options were previously nested under `Manage File Types` and exposed as `Install File Types` and `Uninstall File Types`. The submenu added unnecessary navigation, while the action names did not clearly communicate their purpose.
* The two actions have been replaced with a single dynamic menu item, whose displayed and performed action updates based on the current association state. The respective icons have been added as well (imported namespace Projektanker.Icons to allow for dynamic switching):
* Link → `Associate File Types`
* Link-Slash →`Remove File Type Associations`
* A tooltip has also been added to clarify the action being performed.
* This option is only usable when a game is not running (why associate file types when running a game? Play the game!)
* **Note:** These options are only available on Windows and Linux. macOS already provides robust per‑file “Open With” handling, so a custom association system isn’t necessary. Support can be added later if needed, but current macOS limitations in Ryujinx prevent certain behaviors; these will be addressed in future PRs.
* **Updated:** Menu Icons
* Several icons have been updated to better reflect their associated actions and improve consistency throughout the menu:
* `Load Updates/DLC...` now uses a single Inbox Tray icon instead of separate Update and DLC icons.
* `Open Ryujinx Folder`, `Open Logs Folder`, and `Open Screenshots Folder` now share the same folder icon, as all three actions ultimately open a folder/directory.
* `Exit` is now an Exit icon (arrow-right-from-bracket) instead of a Power button.
### OTHER:
* **Improved:** `Load Updates/DLC` dialog messages
* Existing dialog messages were longer than necessary and included terms such as "missing" updates and "new" DLC.
* These messages have been simplified and standardized:
* Updates Added: {0} or Updates Removed: {0}
* DLC Added: {0} or DLC Removed: {0}
_If there are any features or changes that you wish to be implemented, please comment down below and I'll be happy to accommodate!_
A GIGANTIC, ENORMOUSE HUUUUUUGEE thank you to @Babib3l for testing this and ensuring the commands work! WOOOOO!!!
Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/127
296 lines
17 KiB
XML
Executable File
296 lines
17 KiB
XML
Executable File
<UserControl
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
|
mc:Ignorable="d"
|
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
|
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
|
xmlns:i="clr-namespace:Projektanker.Icons.Avalonia;assembly=Projektanker.Icons.Avalonia"
|
|
xmlns:common="clr-namespace:Ryujinx.Common;assembly=Ryujinx.Common"
|
|
xmlns:renderDocApi="clr-namespace:Ryujinx.Graphics.RenderDocApi;assembly=Ryujinx.Graphics.RenderDocApi"
|
|
x:DataType="viewModels:MainWindowViewModel"
|
|
x:Class="Ryujinx.Ava.UI.Views.Main.MainMenuBarView">
|
|
<Design.DataContext>
|
|
<viewModels:MainWindowViewModel />
|
|
</Design.DataContext>
|
|
<DockPanel HorizontalAlignment="Stretch">
|
|
<controls:RyujinxLogo
|
|
Margin="7, 0"
|
|
ToolTip.Tip="{Binding Title}"/>
|
|
<Menu
|
|
Name="Menu"
|
|
Height="32"
|
|
Margin="0"
|
|
HorizontalAlignment="Left"
|
|
IsOpen="{Binding IsSubMenuOpen, Mode=OneWayToSource}">
|
|
<Menu.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<DockPanel Margin="0" HorizontalAlignment="Stretch" />
|
|
</ItemsPanelTemplate>
|
|
</Menu.ItemsPanel>
|
|
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBar_File_FileLabel}">
|
|
<MenuItem
|
|
Command="{Binding LoadApplicationFromFile}"
|
|
Header="{ext:Locale MenuBar_File_LoadApplicationFromFileButton}"
|
|
Icon="{ext:Icon fa-solid fa-file}"
|
|
IsEnabled="{Binding EnableNonGameRunningControls}"
|
|
InputGesture="{Binding LoadApplicationFromFileGesture}" />
|
|
<MenuItem
|
|
Command="{Binding LoadUnpackedGameFromFolder}"
|
|
Header="{ext:Locale MenuBar_File_LoadUnpackedGameFromFolderButton}"
|
|
Icon="{ext:Icon fa-solid fa-folder-open}"
|
|
IsEnabled="{Binding EnableNonGameRunningControls}"
|
|
InputGesture="{Binding LoadUnpackedGameFromFolderFileGesture}" />
|
|
<MenuItem
|
|
Command="{Binding LoadTitleUpdatesAndDLCFromFolder}"
|
|
Header="{ext:Locale MenuBar_File_LoadTitleUpdatesAndDLCFromFolderButton}"
|
|
Icon="{ext:Icon fa-solid fa-inbox}"
|
|
IsEnabled="{Binding EnableNonGameRunningControls}" />
|
|
<Separator />
|
|
<MenuItem
|
|
Command="{Binding OpenRyujinxFolder}"
|
|
Header="{ext:Locale MenuBar_File_OpenRyuijnxFolderButton}"
|
|
Icon="{ext:Icon fa-solid fa-folder-closed}" />
|
|
<MenuItem
|
|
Command="{Binding OpenLogsFolder}"
|
|
Header="{ext:Locale MenuBar_File_OpenLogsFolderButton}"
|
|
Icon="{ext:Icon fa-solid fa-folder-closed}" />
|
|
<MenuItem
|
|
Command="{Binding OpenScreenshotsFolder}"
|
|
Header="{ext:Locale MenuBar_File_OpenScreenshotsFolderButton}"
|
|
Icon="{ext:Icon fa-solid fa-folder-closed}" />
|
|
<Separator IsVisible="{Binding FileTypeAssociationsVisible}" />
|
|
<MenuItem
|
|
Command="{Binding ToggleFileTypeAssociationsCommand}"
|
|
Header="{Binding FileTypeAssociationsMenuHeader}"
|
|
IsVisible="{Binding FileTypeAssociationsVisible}"
|
|
IsEnabled="{Binding EnableNonGameRunningControls}"
|
|
ToolTip.Tip="{ext:Locale MenuBar_File_FileTypeAssociationsToolTip}">
|
|
<MenuItem.Icon>
|
|
<i:Icon Value="{Binding FileTypeAssociationsIcon}" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<Separator />
|
|
<MenuItem
|
|
Name="CloseRyujinxMenuItem"
|
|
Header="{ext:Locale MenuBar_File_ExitButton}"
|
|
Icon="{ext:Icon fa-solid fa-arrow-right-from-bracket}" />
|
|
</MenuItem>
|
|
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBar_Options_OptionsLabel}">
|
|
<MenuItem
|
|
Name="ChangeLanguageMenuItem"
|
|
Header="{ext:Locale MenuBar_Options_LanguageButton}"
|
|
Icon="{ext:Icon fa-solid fa-globe}">
|
|
</MenuItem>
|
|
<MenuItem
|
|
Command="{Binding ManageProfiles}"
|
|
Header="{ext:Locale MenuBar_Options_UserProfilesButton}"
|
|
Icon="{ext:Icon fa-solid fa-user}"
|
|
IsEnabled="{Binding EnableNonGameRunningControls}">
|
|
</MenuItem>
|
|
<Separator/>
|
|
<MenuItem
|
|
Name="OpenSettingsMenuItem"
|
|
Header="{ext:Locale MenuBar_Options_SettingsButton}"
|
|
Icon="{ext:Icon fa-solid fa-gear}">
|
|
</MenuItem>
|
|
</MenuItem>
|
|
<MenuItem
|
|
Name="ActionsMenuItem"
|
|
VerticalAlignment="Center"
|
|
Header="{ext:Locale MenuBar_Actions_ActionsLabel}"
|
|
IsVisible="{Binding !EnableNonGameRunningControls}">
|
|
<MenuItem
|
|
Name="PauseEmulationMenuItem"
|
|
Header="{ext:Locale MenuBar_Actions_PauseEmulationButton}"
|
|
Icon="{ext:Icon fa-solid fa-pause}"
|
|
InputGesture="{Binding PauseKey}"
|
|
IsEnabled="{Binding !IsPaused}"
|
|
IsVisible="{Binding !IsPaused}" />
|
|
<MenuItem
|
|
Name="ResumeEmulationMenuItem"
|
|
Header="{ext:Locale MenuBar_Actions_ResumeEmulationButton}"
|
|
Icon="{ext:Icon fa-solid fa-play}"
|
|
InputGesture="{Binding PauseKey}"
|
|
IsEnabled="{Binding IsPaused}"
|
|
IsVisible="{Binding IsPaused}" />
|
|
<MenuItem
|
|
Name="StopEmulationMenuItem"
|
|
Header="{ext:Locale MenuBar_Actions_StopEmulationButton}"
|
|
Icon="{ext:Icon fa-solid fa-stop}"
|
|
InputGesture="Escape"
|
|
IsEnabled="{Binding IsGameRunning}" />
|
|
<MenuItem
|
|
Name="RestartEmulationMenuItem"
|
|
Header="{ext:Locale MenuBar_Actions_RestartEmulationButton}"
|
|
Icon="{ext:Icon fa-solid fa-rotate-right}"
|
|
InputGesture="Ctrl + R"
|
|
IsEnabled="{Binding IsGameRunning}" />
|
|
<Separator/>
|
|
<MenuItem
|
|
Command="{Binding OpenAmiiboWindow}"
|
|
AttachedToVisualTree="ScanAmiiboMenuItem_AttachedToVisualTree"
|
|
Header="{ext:Locale MenuBar_Actions_ScanAmiiboButton}"
|
|
Icon="{ext:Icon fa-solid fa-chess-rook}"
|
|
InputGesture="Ctrl + A"
|
|
IsEnabled="{Binding IsAmiiboRequested}" />
|
|
<MenuItem
|
|
Command="{Binding OpenBinFile}"
|
|
AttachedToVisualTree="ScanBinAmiiboMenuItem_AttachedToVisualTree"
|
|
Header="{ext:Locale MenuBar_Actions_ScanAmiiboFromBinButton}"
|
|
Icon="{ext:Icon fa-solid fa-chess-rook}"
|
|
IsVisible="{Binding CanScanAmiiboBinaries}"
|
|
InputGesture="Ctrl + B"
|
|
IsEnabled="{Binding IsAmiiboBinRequested}" />
|
|
<Separator IsVisible="{Binding CanScanAmiiboBinaries}"/>
|
|
<MenuItem
|
|
Command="{Binding OpenSkylanderWindow}"
|
|
AttachedToVisualTree="ScanSkylanderMenuItem_AttachedToVisualTree"
|
|
Header="{ext:Locale MenuBar_Actions_ScanSkylanderButton}"
|
|
Icon="{ext:Icon fa-solid fa-dragon}"
|
|
IsVisible="{Binding ShowSkylanderActions}"
|
|
InputGesture="Ctrl + S"
|
|
IsEnabled="{Binding IsSkylanderRequested}" />
|
|
<MenuItem
|
|
Command="{Binding RemoveSkylander}"
|
|
AttachedToVisualTree="RemoveSkylanderMenuItem_AttachedToVisualTree"
|
|
Header="{ext:Locale MenuBar_Actions_RemoveSkylanderButton}"
|
|
Icon="{ext:Icon fa-solid fa-dragon}"
|
|
IsVisible="{Binding ShowSkylanderActions}"
|
|
InputGesture="Ctrl + D"
|
|
IsEnabled="{Binding HasSkylander}" />
|
|
<MenuItem
|
|
Command="{Binding SimulateWakeUpMessage}"
|
|
Header="{ext:Locale MenuBarOptionsSimulateWakeUpMessage}"
|
|
Icon="{ext:Icon fa-solid fa-sun}"
|
|
InputGesture="Ctrl + M" />
|
|
<Separator />
|
|
<MenuItem
|
|
Command="{Binding TakeScreenshot}"
|
|
Header="{ext:Locale MenuBar_Actions_TakeScreenshotButton}"
|
|
Icon="{ext:Icon fa-solid fa-camera}"
|
|
InputGesture="{Binding ScreenshotKey}"
|
|
IsEnabled="{Binding IsGameRunning}" />
|
|
<MenuItem
|
|
Command="{Binding HideUi}"
|
|
Header="{ext:Locale MenuBar_Actions_HideUiButton}"
|
|
Icon="{ext:Icon fa-solid fa-eye-slash}"
|
|
InputGesture="{Binding ShowUiKey}"
|
|
IsEnabled="{Binding IsGameRunning}" />
|
|
<Separator IsVisible="{Binding RenderDocIsAvailable}" />
|
|
<MenuItem
|
|
IsVisible="{Binding ShowStartCaptureButton}"
|
|
Command="{Binding StartRenderDocCapture}"
|
|
CommandParameter="{Binding}"
|
|
Header="{ext:Locale MenuBar_Actions_StartRenderDocCaptureButton}"
|
|
Icon="{ext:Icon fa-solid fa-video}"
|
|
IsEnabled="{Binding IsGameRunning}" />
|
|
<MenuItem
|
|
IsVisible="{Binding ShowEndCaptureButton}"
|
|
Command="{Binding EndRenderDocCapture}"
|
|
CommandParameter="{Binding}"
|
|
Header="{ext:Locale MenuBar_Actions_EndRenderDocCaptureButton}"
|
|
Icon="{ext:Icon fa-solid fa-video-slash}"
|
|
IsEnabled="{Binding IsGameRunning}" />
|
|
<MenuItem
|
|
IsVisible="{Binding ShowEndCaptureButton}"
|
|
Command="{Binding DiscardRenderDocCapture}"
|
|
CommandParameter="{Binding}"
|
|
Header="{ext:Locale MenuBar_Actions_DiscardRenderDocCaptureButton}"
|
|
ToolTip.Tip="{ext:Locale MenuBar_Actions_DiscardRenderDocCaptureToolTip}"
|
|
Icon="{ext:Icon fa-solid fa-video-slash}"
|
|
IsEnabled="{Binding IsGameRunning}" />
|
|
</MenuItem>
|
|
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBar_Actions_ActionsLabel}" IsVisible="{Binding EnableNonGameRunningControls}">
|
|
<MenuItem Header="{ext:Locale MenuBar_Actions_InstallKeysLabel}" Icon="{ext:Icon fa-solid fa-key}">
|
|
<MenuItem Command="{Binding InstallKeysFromFile}" Header="{ext:Locale MenuBar_Actions_InstallKeysFromFileButton}" Icon="{ext:Icon fa-solid fa-file-code}" />
|
|
<MenuItem Command="{Binding InstallKeysFromFolder}" Header="{ext:Locale MenuBar_Actions_InstallKeysFromFolderButton}" Icon="{ext:Icon fa-solid fa-folder-closed}" />
|
|
</MenuItem>
|
|
<MenuItem Header="{ext:Locale MenuBar_Actions_InstallFirmwareLabel}" Icon="{ext:Icon fa-solid fa-floppy-disk}">
|
|
<MenuItem Command="{Binding InstallFirmwareFromFile}" Header="{ext:Locale MenuBar_Actions_InstallFirmwareFromFileButton}" Icon="{ext:Icon fa-solid fa-file-code}" />
|
|
<MenuItem Command="{Binding InstallFirmwareFromFolder}" Header="{ext:Locale MenuBar_Actions_InstallFirmwareFromFolderButton}" Icon="{ext:Icon fa-solid fa-folder-closed}" />
|
|
</MenuItem>
|
|
<Separator />
|
|
<MenuItem Header="{ext:Locale MenuBar_Actions_ToolsLabel}" Icon="{ext:Icon fa-solid fa-toolbox}">
|
|
<MenuItem
|
|
Name="MiiAppletMenuItem" Header="{ext:Locale MenuBar_Actions_MiiEditorButton}" Icon="{ext:Icon fa-solid fa-face-grin-wide}" />
|
|
<MenuItem Name="XciTrimmerMenuItem" Header="{ext:Locale MenuBar_Actions_XCITrimmerButton}" Icon="{ext:Icon fa-solid fa-scissors}" />
|
|
</MenuItem>
|
|
</MenuItem>
|
|
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarView}">
|
|
<MenuItem
|
|
Command="{Binding ToggleShowConsole}"
|
|
IsVisible="{Binding ShowConsoleVisible}"
|
|
Header="{ext:Locale MenuBar_View_ShowConsoleButton}"
|
|
Classes="withCheckbox"
|
|
Padding="0">
|
|
<MenuItem.Icon>
|
|
<CheckBox
|
|
MinWidth="{DynamicResource CheckBoxSize}"
|
|
MinHeight="{DynamicResource CheckBoxSize}"
|
|
IsChecked="{Binding ShowConsole, Mode=TwoWay}"
|
|
Padding="0" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem
|
|
Command="{Binding ToggleFullscreen}"
|
|
Padding="0"
|
|
Header="{ext:Locale MenuBar_View_ToggleFullscreenButton}"
|
|
Icon="{ext:Icon fa-solid fa-expand}"
|
|
InputGesture="F11"
|
|
Classes="withCheckbox">
|
|
</MenuItem>
|
|
<MenuItem VerticalAlignment="Center" Padding="0" Header="{ext:Locale MenuBarViewWindow}" Icon="{ext:Icon fa-solid fa-window-restore}" Classes="withCheckbox">
|
|
<MenuItem Name="WindowSize720PMenuItem" Padding = "15,0,0,0" Header="{ext:Locale MenuBarViewWindow720}" CommandParameter="1280 720" />
|
|
<MenuItem Name="WindowSize1080PMenuItem" Padding = "15,0,0,0" Header="{ext:Locale MenuBarViewWindow1080}" CommandParameter="1920 1080" />
|
|
<MenuItem Name="WindowSize1440PMenuItem" Padding = "15,0,0,0" Header="{ext:Locale MenuBarViewWindow1440}" CommandParameter="2560 1440" />
|
|
<MenuItem Name="WindowSize2160PMenuItem" Padding = "15,0,0,0" Header="{ext:Locale MenuBarViewWindow2160}" CommandParameter="3840 2160" />
|
|
</MenuItem>
|
|
<Separator />
|
|
<MenuItem Name="ToggleFileTypesMenuItem" Padding="0" Header="{ext:Locale MenuBarShowFileTypes}" Icon="{ext:Icon fa-solid fa-tags}" Classes="withCheckbox" />
|
|
</MenuItem>
|
|
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarHelp}">
|
|
<MenuItem
|
|
Name="AboutWindowMenuItem"
|
|
Header="{ext:Locale MenuBarHelpAbout}"
|
|
Icon="{ext:Icon fa-solid fa-circle-info}" />
|
|
<MenuItem
|
|
Name="CompatibilityListMenuItem"
|
|
Header="{ext:Locale CompatibilityListOpen}"
|
|
Icon="{ext:Icon fa-solid fa-database}"/>
|
|
<MenuItem
|
|
Name="LdnGameListMenuItem"
|
|
Header="{ext:Locale LdnGameListOpen}"
|
|
Icon="{ext:Icon fa-solid fa-people-group}"
|
|
IsEnabled="{Binding IsRyuLdnEnabled}"/>
|
|
<Separator />
|
|
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarHelpFaqAndGuides}" Icon="{ext:Icon fa-solid fa-question}" >
|
|
<MenuItem
|
|
Name="SetupGuideMenuItem"
|
|
Header="{ext:Locale MenuBarHelpSetup}"
|
|
Icon="{ext:Icon fa-solid fa-circle-info}"
|
|
CommandParameter="{x:Static common:SharedConstants.SetupGuideWikiUrl}" />
|
|
<MenuItem
|
|
Name="LdnGuideMenuItem"
|
|
Header="{ext:Locale MenuBarHelpMultiplayer}"
|
|
Icon="{ext:Icon fa-solid fa-circle-info}"
|
|
CommandParameter="{x:Static common:SharedConstants.MultiplayerWikiUrl}" />
|
|
<MenuItem
|
|
Name="FaqMenuItem"
|
|
Header="{ext:Locale MenuBarHelpFaq}"
|
|
Icon="{ext:Icon fa-solid fa-circle-info}"
|
|
CommandParameter="{x:Static common:SharedConstants.FaqWikiUrl}" />
|
|
</MenuItem>
|
|
<Separator />
|
|
<MenuItem
|
|
Name="UpdateMenuItem"
|
|
IsEnabled="{Binding CanUpdate}"
|
|
Header="{ext:Locale MenuBarHelpCheckForUpdates}"
|
|
Icon="{ext:Icon fa-solid fa-rotate}" />
|
|
</MenuItem>
|
|
</Menu>
|
|
</DockPanel>
|
|
</UserControl>
|