Hello everyone!
I am a 8-bit pixel artist and I am making a game within NES screen resolution of 256x240. So to keep it looking good while upscaled, I am building the game at 3x (768x720).
I am trying to get rid of the game application window title bar and frame and to set specific X values for the window size to keep the pixel art aspect ratio intact (256x240, 512x480, 768x720)
I managed to edit the package.json to remove it by adding "frame: false", and "position: "center", but after doing some research I found out that also makes the window "undraggable" and the position kept behaving the same as before when the window was resized.
I researched for some solution for drag the window and i found out this on docs.nwjs.io:
"Frameless apps do not have a title bar for the user to click and drag the window. You can use CSS to designate DOM elements as draggable regions.
.drag-enable {
-webkit-app-region: drag;
}
.drag-disable {
-webkit-app-region: no-drag;
}
I did many amateurish attemps editing the Index.html but I have no coding knowledge to make it work right.
about the position of the window on screen, this is what i did and how the window look like:
256 x 240
512 x 480
768 x 720 (default build, that's why it looks centered)
My questions then are, if possible, can somebody help me with the draggable code to make it work, or some workaround and also help me understand why the window isn't centered and how can I make that happen?
EDIT: forgot to mention I've tried SRD game upgrade plugin, but it crashed the game completely due being outdated. So, not much of an option 🙁
Thanks in advance! 😀
I am a 8-bit pixel artist and I am making a game within NES screen resolution of 256x240. So to keep it looking good while upscaled, I am building the game at 3x (768x720).
I am trying to get rid of the game application window title bar and frame and to set specific X values for the window size to keep the pixel art aspect ratio intact (256x240, 512x480, 768x720)
I managed to edit the package.json to remove it by adding "frame: false", and "position: "center", but after doing some research I found out that also makes the window "undraggable" and the position kept behaving the same as before when the window was resized.
I researched for some solution for drag the window and i found out this on docs.nwjs.io:
"Frameless apps do not have a title bar for the user to click and drag the window. You can use CSS to designate DOM elements as draggable regions.
.drag-enable {
-webkit-app-region: drag;
}
.drag-disable {
-webkit-app-region: no-drag;
}
I did many amateurish attemps editing the Index.html but I have no coding knowledge to make it work right.
about the position of the window on screen, this is what i did and how the window look like:
256 x 240
512 x 480
768 x 720 (default build, that's why it looks centered)
My questions then are, if possible, can somebody help me with the draggable code to make it work, or some workaround and also help me understand why the window isn't centered and how can I make that happen?
EDIT: forgot to mention I've tried SRD game upgrade plugin, but it crashed the game completely due being outdated. So, not much of an option 🙁
Thanks in advance! 😀