Hey, so I'm pretty new to electron and as my first project I essentially wanted to make a client for a browser game. I was attempting to create a frameless window and then add my own "bar" under it with CSS and make that part draggable with a mouse. After that I could add my own close and minimizing buttons. For the draggable bar I can simply make a box with html and then make it draggable in a style.css file, but I'm not sure how to make the buttons. Could anyone help me out with that?
#Adding a closing button and dragging bar.
1 messages · Page 1 of 1 (latest)
just put images/buttons/divs as buttons, style them (don't forget to make them non-draggable otherwise you won't receive events for them), attach on click listeners and call an exposed method from a preload script that notifies the main script to close/minize the window via ipc
for the close button you can also simply call window.close