MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / createBrowserWindow

Function createBrowserWindow

src/main/LogsWindow.ts:159–185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157 }
158
159 function createBrowserWindow(): BrowserWindow {
160 const window = new BrowserWindow({
161 title: 'Flashpoint Logger',
162 icon: path.join(__dirname, '../window/images/icon.png'),
163 useContentSize: true,
164 width: init.args.width,
165 height: init.args.height,
166 webPreferences: {
167 preload: path.resolve(__dirname, './MainWindowPreload.js'),
168 nodeIntegration: true,
169 contextIsolation: false
170 },
171 });
172 remoteMain.enable(window.webContents);
173 window.setMenu(null); // Remove the menu bar
174 window.loadFile(path.join(__dirname, '../window/logger.html'));
175
176 // window.webContents.openDevTools();
177
178 window.on('closed', () => {
179 if (state.window === window) {
180 state.window = undefined;
181 }
182 });
183
184 return window;
185 }
186
187 /**
188 * Resolves/Rejects when the wrapped promise does. Rejects if the timeout happens before that.

Callers 2

startupFunction · 0.70
onAppActivateFunction · 0.70

Calls 1

onMethod · 0.65

Tested by

no test coverage detected