Using NeutralinoJS, how can start the app right in the center of the screen?
It should look like the splashscreen of any app. Unlike ElectronJS, Neutralino's window options doesn't seem to have a center()
method.
Using NeutralinoJS, how can start the app right in the center of the screen?
It should look like the splashscreen of any app. Unlike ElectronJS, Neutralino's window options doesn't seem to have a center()
method.
I made a simple javascript function by using native
API
of neutralionJS. UsedNeutralino.computer.getDisplays()
to height & width of the screen along withNeutralino.window.getSize()
to height & width of the window andNeutralino.window.move(x,y)
to center it. Note: x,y is the coordinates of the top right corner of the window. For a better explaination I have also attested a img demostrating it.Image link
The black dot is actual center of screen, red dot is where
Neutralino.window.move(x,y)
takes you too.