From 06cd3abe6c5a8d86bf2473089c489415ce8c4573 Mon Sep 17 00:00:00 2001
From: ooa113y <13thSlayer@gmail.com>
Date: Sat, 24 Jul 2021 21:48:00 +0300
Subject: [PATCH] Implement "hide UI" option (#2411)
* Implement jduncanator method
* Rename function/button ID
* Move option to Actions menu (makes no sense while emulation is inactive...)
---
Ryujinx/Ui/MainWindow.cs | 14 ++++++++++++++
Ryujinx/Ui/MainWindow.glade | 12 +++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs
index c7d86c7e..387ae63a 100644
--- a/Ryujinx/Ui/MainWindow.cs
+++ b/Ryujinx/Ui/MainWindow.cs
@@ -1072,6 +1072,15 @@ namespace Ryujinx.Ui
ConfigurationState.Instance.Graphics.AspectRatio.Value = ((int)aspectRatio + 1) > Enum.GetNames(typeof(AspectRatio)).Length - 1 ? AspectRatio.Fixed4x3 : aspectRatio + 1;
}
+ private void Focus_Menu_Bar(object sender, KeyReleaseEventArgs args)
+ {
+ if (args.Event.Key == Gdk.Key.Alt_L)
+ {
+ ToggleExtraWidgets(true);
+ _menuBar.GrabFocus();
+ }
+ }
+
private void Row_Clicked(object sender, ButtonReleaseEventArgs args)
{
if (args.Event.Button != 3 /* Right Click */)
@@ -1364,6 +1373,11 @@ namespace Ryujinx.Ui
settingsWindow.Show();
}
+ private void HideUi_Pressed(object sender, EventArgs args)
+ {
+ ToggleExtraWidgets(false);
+ }
+
private void ManageUserProfiles_Pressed(object sender, EventArgs args)
{
UserProfilesManagerWindow userProfilesManagerWindow = new UserProfilesManagerWindow(_accountManager, _contentManager, _virtualFileSystem);
diff --git a/Ryujinx/Ui/MainWindow.glade b/Ryujinx/Ui/MainWindow.glade
index 7bf38f47..abe96907 100644
--- a/Ryujinx/Ui/MainWindow.glade
+++ b/Ryujinx/Ui/MainWindow.glade
@@ -6,6 +6,7 @@
False
Ryujinx
center
+