aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/app')
-rw-r--r--src/app/main.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/app/main.js b/src/app/main.js
index 72e0e09..1dbff40 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -242,6 +242,31 @@ ipcRenderer.on("confirm", (event, data) => {
ipcRenderer.send("confirm-closed-" + data.id, confirmed);
})
+let is_running = false;
+ipcRenderer.on("is-running", (event, running) => {
+ let set_playbtns = (text) => {
+ let playbtns = document.querySelectorAll(".playBtn");
+ for (let i = 0; i < playbtns.length; i++) {
+ playbtns[i].innerHTML = text;
+ }
+ }
+
+ if (running && is_running != running) {
+ setButtons(false);
+ set_playbtns(lang("general.running"));
+
+ is_running = running;
+ return;
+ }
+
+ if (is_running != running) {
+ setButtons(true);
+ set_playbtns(lang("gui.launch"));
+
+ is_running = running;
+ }
+})
+
// Updates the installed mods
ipcRenderer.on("mods", (event, mods_obj) => {
modsobj = mods_obj;