Hello guys... I'm quite new to the custom-electron-titlebar package
I was starting to create my title bar the I created the buttons. Everything was doing fine when I'm using the "electron ." script.
But then, I wanted to test my application on the Windows platform so I used an electron packager to deploy to windows executable file. When I opened it, I noticed that the menu buttons are missing. I built the electron app again now with the dev tools opened. I saw that there is an error...
I don't know what to do since I'm only a beginner... Here my code...
Hello guys... I'm quite new to the custom-electron-titlebar package
I was starting to create my title bar the I created the buttons. Everything was doing fine when I'm using the "electron ." script. But then, I wanted to test my application on the Windows platform so I used an electron packager to deploy to windows executable file. When I opened it, I noticed that the menu buttons are missing. I built the electron app again now with the dev tools opened. I saw that there is an error...
I don't know what to do since I'm only a beginner... Here my code...
Javascript Renderer process
`const customTitlebar = require("custom-electron-titlebar"); const remote = require("electron").remote;
const app = remote.app; const dialog = remote.dialog; const shell = remote.shell;
const fs = require('fs');
var titlebar = new customTitlebar.Titlebar({ backgroundColor: customTitlebar.Color.fromHex("#000"), icon: "./vendor/imgs/icon.ico", });
const menu = new remote.Menu(); menu.append( new remote.MenuItem({ label: "File", submenu: [{ label: "New Project", click: () => { window.location.replace("index.html"); }, }, { label: "Open Project", click: () => { openProject('desktop'); } }, ], }) );`
`menu.append( new remote.MenuItem({ label: "Item 2", submenu: [{ label: "Subitem checkbox", type: "checkbox", checked: true, }, { type: "separator", }, { label: "Subitem with submenu", submenu: [{ label: "Submenu &item 1", accelerator: "Ctrl+T", }, ], }, ], }) );
titlebar.updateMenu(menu);
titlebar.updateTitle("Game LaunchPad | New Project");
function openProject(defaultPath) { var dPath = app.getPath(defaultPath); var openDiag = dialog.showOpenDialog({ properties: ["openFile", "multiSelections"], defaultPath: dPath, filters: [{
}`
I hope someone notices this thank you