Added option to set idle time before cursor is hidden (Ryujinx#4390)

In SettingsWindow.cs and SettingsWindow.glade:
Replaced Always/On Idle/Never radio buttons with a dropdown (combo box).
When selecting "On Idle", a "Seconds" label and numeric text box (spinner) appear.  The spinner is limited 1-10.

In ConfigurationFileFormat.cs and ConfigurationState.cs, and SettingsViewModel.cs:
Load the saved value, or default 5 seconds if no value exists.
Save the custom set value to the config file.

In SettingsViewModel.cs:
Catch when the idle time setting is changed while a game is running, and change the value live.
This commit is contained in:
Premo 2024-04-25 21:22:12 -04:00 committed by GitHub
parent f514b51079
commit 9a1f3370bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -172,6 +172,11 @@ namespace Ryujinx.UI.Common.Configuration
/// </summary> /// </summary>
public HideCursorMode HideCursor { get; set; } public HideCursorMode HideCursor { get; set; }
/// <summary>
/// How many seconds to wait before hiding the cursor when set to hide on idle
/// </summary>
public int HideCursorIdleTime { get; set; }
/// <summary> /// <summary>
/// Enables or disables Vertical Sync /// Enables or disables Vertical Sync
/// </summary> /// </summary>