Skip to content

Commit

Permalink
fix settings win [saf]
Browse files Browse the repository at this point in the history
  • Loading branch information
Emily committed Sep 5, 2022
1 parent 85cd282 commit 0b0b11a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,15 @@ async function start() {


let lastOpen = 0;
let settingsOpened = true;
async function checkSettingsShortcut() {
const now = Date.now();
if (lastOpen + 550 < now) {
const checkKey = Manager.game.winapi.actions.isPressed;
if (checkKey(0x20) && checkKey(0x11)) {
sett.webContents.send('toggleSettings');
sett.setIgnoreMouseEvents(settingsOpened, { forward: false });
settingsOpened = !settingsOpened;
lastOpen = now;
}
}
Expand Down

0 comments on commit 0b0b11a

Please sign in to comment.