mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2026-02-06 11:17:36 +00:00
Add ability to enable/disable mouse lock
This commit is contained in:
parent
6b050e06da
commit
c847c91edb
@ -4239,6 +4239,8 @@ class EmulatorJS {
|
||||
this.createBottomMenuBarListeners();
|
||||
} else if (option === "keyboardInput") {
|
||||
this.gameManager.setKeyboardEnabled(value === "enabled");
|
||||
} else if (option === "lockMouse") {
|
||||
this.enableMouseLock = (value === "enabled");
|
||||
}
|
||||
}
|
||||
menuOptionChanged(option, value) {
|
||||
@ -4793,6 +4795,11 @@ class EmulatorJS {
|
||||
"enabled": this.localization("Enabled"),
|
||||
}, ((this.defaultCoreOpts && this.defaultCoreOpts.useKeyboard === true) ? "enabled" : "disabled"), inputOptions, true);
|
||||
|
||||
addToMenu(this.localization("Lock Mouse"), "lockMouse", {
|
||||
"disabled": this.localization("Disabled"),
|
||||
"enabled": this.localization("Enabled"),
|
||||
}, (this.enableMouseLock === true ? "enabled" : "disabled"), inputOptions, true);
|
||||
|
||||
checkForEmptyMenu(inputOptions);
|
||||
|
||||
if (this.saveInBrowserSupported()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user