mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-06 07:36:26 +02:00
UI: More advanced customization for what happens when Ryujinx loses focus
This commit is contained in:
parent
7591b07fce
commit
17e8ae1d9a
13 changed files with 318 additions and 40 deletions
|
@ -25,10 +25,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
Version = RyujinxApp.FullAppName + "\n" + Program.Version;
|
||||
UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value);
|
||||
|
||||
ThemeManager.ThemeChanged += ThemeManager_ThemeChanged;
|
||||
RyujinxApp.ThemeChanged += Ryujinx_ThemeChanged;
|
||||
}
|
||||
|
||||
private void ThemeManager_ThemeChanged()
|
||||
private void Ryujinx_ThemeChanged()
|
||||
{
|
||||
Dispatcher.UIThread.Post(() => UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value));
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
ThemeManager.ThemeChanged -= ThemeManager_ThemeChanged;
|
||||
RyujinxApp.ThemeChanged -= Ryujinx_ThemeChanged;
|
||||
|
||||
GithubLogo.Dispose();
|
||||
DiscordLogo.Dispose();
|
||||
|
|
|
@ -128,6 +128,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
public bool EnableMouse { get; set; }
|
||||
public bool DisableInputWhenOutOfFocus { get; set; }
|
||||
|
||||
public int FocusLostActionType { get; set; }
|
||||
|
||||
public VSyncMode VSyncMode
|
||||
{
|
||||
get => _vSyncMode;
|
||||
|
@ -481,6 +483,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
ShowTitleBar = config.ShowTitleBar;
|
||||
HideCursor = (int)config.HideCursor.Value;
|
||||
UpdateCheckerType = (int)config.UpdateCheckerType.Value;
|
||||
FocusLostActionType = (int)config.FocusLostActionType.Value;
|
||||
|
||||
GameDirectories.Clear();
|
||||
GameDirectories.AddRange(config.UI.GameDirs.Value);
|
||||
|
@ -589,6 +592,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
config.ShowTitleBar.Value = ShowTitleBar;
|
||||
config.HideCursor.Value = (HideCursorMode)HideCursor;
|
||||
config.UpdateCheckerType.Value = (UpdaterType)UpdateCheckerType;
|
||||
config.FocusLostActionType.Value = (FocusLostType)FocusLostActionType;
|
||||
|
||||
if (GameDirectoryChanged)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue