I want to create game that can:
1) Start in fullscreen (and hide cursor, as well as start in specified resolution, instead of using desktop resolution only)
2) Can switch resolution in-game
3) Can enumerate list of available system resolutions, instead of
using hardcoded list
4) Can store resolution settings in config (ini) or registry and start next time in saved resolution
5) Can switch to windowed mode and back with standard ALT+WIN (or browser standard F11) or in-game menu item.
6) Can keep proper aspect ratio in any fullscreen resolution, as well as any windowed mode including user stretched mode (i wish window to autocorrect ver and hor resolution as same time user resizing it, to keep aspect ratio)
7) Can have at least 3 UI presets for 4:3, 16:9 and 16:10 displays and switch to them automaticaly according to current resolution aspect ratio.
Or at least fixed 16:9 in every aspect, with no funny glitches.
8) Can exit fullscreen game with menu item "exit" in addition to Alt+F4 or X button in window.
9) Can do all of above on every posible exported platform\format (all node-webkit wrappers for linux, osx and windows are minimum i need).
How can i achive that with Constuct 2? I dont see any in editor options for that!
A the moment i only managed to launch node-webkit in fullscreen by editing \Construct 2\exporters\html5\node-webkit\package.json and adding
"fullscreen": true,
in window section. But it only allows to launch game in same resolution as desktop have now, and it upscales layout by keeping fixed horizontal aspect, vertical aspect meanwhile gets bigger, if im going from wider 16:9 to no so wider 16:10 or 4:3, if i go to anything wider than 16:9, then vertical aspect is fixed, but foreground level element with paralax set to 100 goes beyond layout and appears above black bars, while fixed background covers only 16:9 area.
As for rest - im almost out of ideas!
Im thinking about using javascript window.close() as function for exit button or using this github.com/rogerwang/node-webkit/wiki/Window for closing, changing resolution, switching to windowed and fullscreen, but i have no idea where in Construct 2 i should put these js functions to be called whenever button pressed in game.
Well, im thinking about ugly hack - manually editing html file after export and adding some overlay above game with exit button that call these JS functions, but thats a lot of extra work and really ugly, comparing to native in-game expirience.
Also i would like to auto pause game on unfocused or minimized window or during using, but yet have no idea how to make it in Constuct 2.
Can anyone please give some tips, share portions of code from your games that would do this, or maybe Scirra guys can add these features to their TO-DO list (and with high priority, because its one of the must have features that Constuct 2 really needs ASAP) so that in near features that would be built-in and can be done easy way?
P.S. - I can do most of that in flash with some projectors like Zinc with no problem, but here its a real problem!