Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

Commit

Permalink
[create release] Add DevTools button for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKodeToad committed Oct 29, 2021
1 parent d060acd commit 1a2d3fb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ <h1 class="title">Sol Client</h1>
<br/>
<button class="button button-generic button-centred minecraft-folder">Open Minecraft Folder</button>
<br/>
<button class="button button-generic button-centred devtools">Open DevTools</button>
<br/>
<div class="memory-box">
<p>Memory</p>
<input type="range" class="memory">
Expand Down
2 changes: 2 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ window.addEventListener("DOMContentLoaded", () => {

document.querySelector(".minecraft-folder").onclick = () => shell.openPath(Utils.gameDirectory);

document.querySelector(".devtools").onclick = () => ipcRenderer.send("devtools");

var memory = document.querySelector(".memory");
var memoryLabel = document.querySelector(".memory-label");

Expand Down
2 changes: 2 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ async function run() {
});
});

ipcMain.on("devtools", (event) => window.webContents.openDevTools());

app.whenReady().then(() => {
createWindow();

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sol-client-launcher",
"version": "0.1.2",
"version": "0.1.3",
"description": "Launcher for Sol Client.",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit 1a2d3fb

Please sign in to comment.