From 3fbaf43d4e11063c18665fdbb8427a7fa7901c42 Mon Sep 17 00:00:00 2001 From: Xpl0itR Date: Mon, 17 Jun 2019 12:16:03 +0100 Subject: [PATCH] added spin button for new option and tooltips to settings --- Ryujinx/Configuration.cs | 2 +- Ryujinx/GUI/SwitchSettings.cs | 26 +++++--- Ryujinx/GUI/SwitchSettings.glade | 106 ++++++++++++++++++++++++++++++- Ryujinx/GUI/assets/Theme.css | 8 ++- 4 files changed, 131 insertions(+), 11 deletions(-) diff --git a/Ryujinx/Configuration.cs b/Ryujinx/Configuration.cs index adad38c28c..82d1f1b200 100644 --- a/Ryujinx/Configuration.cs +++ b/Ryujinx/Configuration.cs @@ -109,7 +109,7 @@ namespace Ryujinx /// /// Enables FS access log output to the console. Possible modes are 0-3 /// - public int FsGlobalAccessLogMode { get; private set; } + public int FsGlobalAccessLogMode { get; set; } /// /// Use old ChocolArm64 ARM emulator diff --git a/Ryujinx/GUI/SwitchSettings.cs b/Ryujinx/GUI/SwitchSettings.cs index d4007e0c65..437ca35c09 100644 --- a/Ryujinx/GUI/SwitchSettings.cs +++ b/Ryujinx/GUI/SwitchSettings.cs @@ -28,6 +28,9 @@ namespace Ryujinx [GUI] CheckButton StubLogToggle; [GUI] CheckButton DebugLogToggle; [GUI] CheckButton FileLogToggle; + [GUI] CheckButton GuestLogToggle; + [GUI] CheckButton FsAccessLogToggle; + [GUI] Adjustment FGALMSpinAdjustment; [GUI] CheckButton DockedModeToggle; [GUI] CheckButton DiscordToggle; [GUI] CheckButton VSyncToggle; @@ -159,7 +162,8 @@ namespace Ryujinx R1.Label = SwitchConfig.KeyboardControls.RightJoycon.ButtonR.ToString(); ZR1.Label = SwitchConfig.KeyboardControls.RightJoycon.ButtonZr.ToString(); - CustThemeDir.Buffer.Text = SwitchConfig.CustomThemePath; + CustThemeDir.Buffer.Text = SwitchConfig.CustomThemePath; + FGALMSpinAdjustment.Value = SwitchConfig.FsGlobalAccessLogMode; GameDirsBox.AppendColumn("", new CellRendererText(), "text", 0); GameDirsBoxStore = new ListStore(typeof(string)); @@ -209,7 +213,7 @@ namespace Ryujinx private void BrowseDir_Pressed(object obj, EventArgs args) { - FileChooserDialog fc = new FileChooserDialog("Choose the game directory to add to the list", this, FileChooserAction.SelectFolder, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept); + FileChooserDialog fc = new FileChooserDialog("Choose the game directory to add to the list", this, FileChooserAction.SelectFolder, "Cancel", ResponseType.Cancel, "Add", ResponseType.Accept); if (fc.Run() == (int)ResponseType.Accept) { @@ -238,7 +242,7 @@ namespace Ryujinx private void BrowseThemeDir_Pressed(object obj, EventArgs args) { - FileChooserDialog fc = new FileChooserDialog("Choose the theme to load", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept); + FileChooserDialog fc = new FileChooserDialog("Choose the theme to load", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Select", ResponseType.Accept); fc.Filter = new FileFilter(); fc.Filter.AddPattern("*.css"); @@ -271,6 +275,11 @@ namespace Ryujinx if (InfoLogToggle.Active) { SwitchConfig.LoggingEnableInfo = true; } if (StubLogToggle.Active) { SwitchConfig.LoggingEnableStub = true; } if (DebugLogToggle.Active) { SwitchConfig.LoggingEnableDebug = true; } +<<<<<<< HEAD +======= + if (GuestLogToggle.Active) { SwitchConfig.LoggingEnableGuest = true; } + if (FsAccessLogToggle.Active) { SwitchConfig.LoggingEnableFsAccessLog = true; } +>>>>>>> added spin button for new option and tooltips to settings if (FileLogToggle.Active) { SwitchConfig.EnableFileLog = true; } if (DockedModeToggle.Active) { SwitchConfig.DockedMode = true; } if (DiscordToggle.Active) { SwitchConfig.EnableDiscordIntergration = true; } @@ -330,11 +339,12 @@ namespace Ryujinx ButtonZr = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), ZR1.Label), }; - SwitchConfig.SystemLanguage = (SystemLanguage)Enum.Parse(typeof(SystemLanguage), SystemLanguageSelect.ActiveId); - SwitchConfig.ControllerType = (HidControllerType)Enum.Parse(typeof(HidControllerType), Controller1Type.ActiveId); - SwitchConfig.CustomThemePath = CustThemeDir.Buffer.Text; - SwitchConfig.GameDirs = gameDirs; - + SwitchConfig.SystemLanguage = (SystemLanguage)Enum.Parse(typeof(SystemLanguage), SystemLanguageSelect.ActiveId); + SwitchConfig.ControllerType = (HidControllerType)Enum.Parse(typeof(HidControllerType), Controller1Type.ActiveId); + SwitchConfig.CustomThemePath = CustThemeDir.Buffer.Text; + SwitchConfig.GameDirs = gameDirs; + SwitchConfig.FsGlobalAccessLogMode = (int)FGALMSpinAdjustment.Value; + Configuration.SaveConfig(SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json")); Configuration.Configure(device, SwitchConfig); diff --git a/Ryujinx/GUI/SwitchSettings.glade b/Ryujinx/GUI/SwitchSettings.glade index 976f5fe09a..164d8913b4 100644 --- a/Ryujinx/GUI/SwitchSettings.glade +++ b/Ryujinx/GUI/SwitchSettings.glade @@ -2,6 +2,11 @@ + + 3 + 1 + 10 + False Ryujinx - Settings @@ -113,6 +118,7 @@ True False + Change System Language end System Language: @@ -126,6 +132,7 @@ True False + Change System Language 5 American English @@ -166,6 +173,7 @@ True True False + Enables or disables Discord Rich Presense start 5 True @@ -282,6 +290,7 @@ True True + Enter a game directroy to add to the list True @@ -296,6 +305,7 @@ True True True + Add a game directory to the list 5 @@ -312,6 +322,7 @@ True True True + Browse for a game directory 5 @@ -328,6 +339,7 @@ True True True + Remove selected game directory 5 @@ -410,6 +422,7 @@ True True False + Enable or disable custom themes in the GUI start True @@ -429,7 +442,8 @@ True False - Custom Theme Dir: + Path to custom GUI theme + Custom Theme Path: False @@ -442,6 +456,7 @@ True True + Path to custom GUI theme center @@ -457,6 +472,7 @@ True True True + Browse for a custom GUI theme 5 @@ -1431,6 +1447,7 @@ True True False + Enables or disables Vertical Sync start 5 5 @@ -1448,6 +1465,7 @@ True True False + Enables or disables multi-core scheduling of threads start 5 5 @@ -1465,6 +1483,7 @@ True True False + Enable or Disable aggressive CPU optimizations start 5 5 @@ -1482,6 +1501,7 @@ True True False + Enables integrity checks on Game content files start 5 5 @@ -1559,6 +1579,7 @@ True True False + Enables or disables logging to a file on disk start 5 5 @@ -1580,6 +1601,7 @@ True False + Location of the log file Log File Location: @@ -1593,6 +1615,7 @@ True True + Location of the log file center False False @@ -1617,6 +1640,7 @@ True True False + Enables printing debug log messages start 5 5 @@ -1634,6 +1658,7 @@ True True False + Enables printing stub log messages start 5 5 @@ -1651,6 +1676,7 @@ True True False + Enables printing info log messages start 5 5 @@ -1668,6 +1694,7 @@ True True False + Enables printing warning log messages start 5 5 @@ -1685,6 +1712,7 @@ True True False + Enables printing error log messages start 5 5 @@ -1696,6 +1724,81 @@ 6 + + + Enable Guest Logs + True + True + False + Enables printing guest log messages + start + 5 + 5 + True + + + False + True + 7 + + + + + Enable Fs Access Logs + True + True + False + Enables printing fs access log messages + start + 5 + 5 + True + + + False + True + 8 + + + + + True + False + + + True + False + Enables FS access log output to the console. Possible modes are 0-3 + Fs Global Access Log Mode: + + + False + True + 5 + 0 + + + + + True + True + Enables FS access log output to the console. Possible modes are 0-3 + FGALMSpinAdjustment + + + True + True + 1 + + + + + False + True + 5 + 9 + + True @@ -1787,6 +1890,7 @@ True True False + Enable or disable ignoring missing services start 5 5 diff --git a/Ryujinx/GUI/assets/Theme.css b/Ryujinx/GUI/assets/Theme.css index fbe2338051..f644be8f84 100644 --- a/Ryujinx/GUI/assets/Theme.css +++ b/Ryujinx/GUI/assets/Theme.css @@ -73,7 +73,7 @@ textview text { entry { background-color: #23272A; - border-color: #23272A; + border: none; color: #F4F6F7; } @@ -81,6 +81,12 @@ entry { color: #929394; } +spinbutton { + background-color: #23272A; + border: none; + color: #F4F6F7; +} + scrolledwindow { border-color: #2C2F33; }