ELECTRON: Allow automatically hiding the top menu in Electron (#2325)

This commit is contained in:
Femboy Fireball
2025-10-03 19:45:18 +00:00
committed by GitHub
parent 7225a2b22e
commit 18b062663d
3 changed files with 50 additions and 21 deletions

View File

@@ -5,6 +5,7 @@ const achievements = require("./achievements");
const menu = require("./menu");
const path = require("path");
const { windowTracker } = require("./windowTracker");
const storage = require("./storage");
const debug = process.argv.includes("--debug");
@@ -18,12 +19,14 @@ async function createWindow(killall) {
}
const tracker = windowTracker("main");
const window = new BrowserWindow({
icon,
show: false,
backgroundThrottling: false,
backgroundColor: "#000000",
title: "Bitburner",
autoHideMenuBar: storage.isMenuHideEnabled(),
x: tracker.state.x,
y: tracker.state.y,
width: tracker.state.width,