diff options
author | 0neGal <mail@0negal.com> | 2024-06-20 00:11:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 00:11:19 +0200 |
commit | 25adf3d3369526ad393d4086ad2c82963bc02345 (patch) | |
tree | fb9b95a174b1490fd60689160f88732b746da2bb /src/win.js | |
parent | 0f40ecfdf1d351762e6b0bc525b3d716756c5643 (diff) | |
parent | 6c2df3103bca1b782101601b088f550f2662ee99 (diff) | |
download | Viper-25adf3d3369526ad393d4086ad2c82963bc02345.tar.gz Viper-25adf3d3369526ad393d4086ad2c82963bc02345.zip |
Merge branch 'main' into gamepad-support
Diffstat (limited to 'src/win.js')
-rw-r--r-- | src/win.js | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -25,6 +25,11 @@ alert = async (msg) => { }) } +// sends an toast to the renderer +toast = (properties) => { + win.send("toast", properties); +} + // this increments for every confirm alert that's created, the ID is // used to keep track of popups being opened or closed. let confirm_id = 0; @@ -48,9 +53,10 @@ confirm = async (msg) => { let win = { send: () => {}, - log: log, - alert: alert, - confirm: confirm + log: log, + toast: toast, + alert: alert, + confirm: confirm } let func = () => { @@ -60,9 +66,10 @@ let func = () => { func.set = (main_window) => { win = main_window; - win.log = log; - win.alert = alert; - win.confirm = confirm; + win.log = log; + win.toast = toast; + win.alert = alert; + win.confirm = confirm; } module.exports = func; |