aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-01-03 00:43:45 +0100
committer0neGal <mail@0negal.com>2022-01-03 00:43:45 +0100
commitbf7bd0993714f20fd0ab360de956378113e1d9c2 (patch)
tree9ba692562f64ed86151617756cfd214e57c8b25d /src/index.js
parent9c4b2aa7bfe2a96354f968c23a98213995242380 (diff)
downloadViper-bf7bd0993714f20fd0ab360de956378113e1d9c2.tar.gz
Viper-bf7bd0993714f20fd0ab360de956378113e1d9c2.zip
fully working GUI functionality
Smoothly updates and works flawlessly, the only thing that really needs improvements is the design and on top of that installing mods from a Zip file over folder.
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js
index 161092a..7ef9321 100644
--- a/src/index.js
+++ b/src/index.js
@@ -57,6 +57,14 @@ function start() {
ipcMain.on("updatenow", () => {
autoUpdater.quitAndInstall();
})
+
+ ipcMain.on("removemod", (event, mod) => {utils.mods.remove(mod)})
+ ipcMain.on("togglemod", (event, mod) => {utils.mods.toggle(mod)})
+ ipcMain.on("installmod", () => {
+ dialog.showOpenDialog({properties: ["openDirectory"]}).then(res => {
+ utils.mods.install(res.filePaths[0]);
+ }).catch(err => {console.error(err)})
+ })
}
ipcMain.on("launch", (event) => {utils.launch()})