Added option to set idle time before cursor is hidden
Fixes #4930 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:
parent
c6f8bfed90
commit
e00f7518c3
1 changed files with 3 additions and 0 deletions
|
@ -132,6 +132,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
public bool CheckUpdatesOnStart { get; set; }
|
public bool CheckUpdatesOnStart { get; set; }
|
||||||
public bool ShowConfirmExit { get; set; }
|
public bool ShowConfirmExit { get; set; }
|
||||||
public int HideCursor { get; set; }
|
public int HideCursor { get; set; }
|
||||||
|
public int HideCursorIdleTime { get; set; }
|
||||||
public bool EnableDockedMode { get; set; }
|
public bool EnableDockedMode { get; set; }
|
||||||
public bool EnableKeyboard { get; set; }
|
public bool EnableKeyboard { get; set; }
|
||||||
public bool EnableMouse { get; set; }
|
public bool EnableMouse { get; set; }
|
||||||
|
@ -391,6 +392,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
CheckUpdatesOnStart = config.CheckUpdatesOnStart;
|
CheckUpdatesOnStart = config.CheckUpdatesOnStart;
|
||||||
ShowConfirmExit = config.ShowConfirmExit;
|
ShowConfirmExit = config.ShowConfirmExit;
|
||||||
HideCursor = (int)config.HideCursor.Value;
|
HideCursor = (int)config.HideCursor.Value;
|
||||||
|
HideCursorIdleTime = (int)config.HideCursorIdleTime.Value;
|
||||||
|
|
||||||
GameDirectories.Clear();
|
GameDirectories.Clear();
|
||||||
GameDirectories.AddRange(config.UI.GameDirs.Value);
|
GameDirectories.AddRange(config.UI.GameDirs.Value);
|
||||||
|
@ -475,6 +477,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
config.CheckUpdatesOnStart.Value = CheckUpdatesOnStart;
|
config.CheckUpdatesOnStart.Value = CheckUpdatesOnStart;
|
||||||
config.ShowConfirmExit.Value = ShowConfirmExit;
|
config.ShowConfirmExit.Value = ShowConfirmExit;
|
||||||
config.HideCursor.Value = (HideCursorMode)HideCursor;
|
config.HideCursor.Value = (HideCursorMode)HideCursor;
|
||||||
|
config.HideCursorIdleTime.Value = HideCursorIdleTime;
|
||||||
|
|
||||||
if (_directoryChanged)
|
if (_directoryChanged)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue