Pass through input/hotkeys while Lua form is focused

to restore previous behaviour, call `forms.setproperty(form_handle,
"BlocksInputWhenFocused", true);`
This commit is contained in:
YoshiRulz 2023-01-05 02:09:12 +10:00
parent af9f5b9b9c
commit 0591d2e2d2
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 3 additions and 0 deletions

View File

@ -519,6 +519,7 @@ namespace BizHawk.Client.EmuHawk
FormBase { BlocksInputWhenFocused: false } => AllowInput.All,
ControllerConfig => AllowInput.All,
HotkeyConfig => AllowInput.All,
LuaWinform { BlocksInputWhenFocused: false } => AllowInput.All,
_ => AllowInput.None
}
);

View File

@ -13,6 +13,8 @@ namespace BizHawk.Client.EmuHawk
private readonly string _currentDirectory = Environment.CurrentDirectory;
private readonly LuaFile _ownerFile;
public bool BlocksInputWhenFocused { get; set; } = false;
public LuaWinform(LuaFile ownerFile, Action<IntPtr> formsWindowClosedCallback)
{
_ownerFile = ownerFile;