Set window size on launch when using Node-Webkit?

Get help using Construct 2

Post » Sat Jun 08, 2013 3:03 pm

Is there a way to set the size of my window when launching my game that has been exported with Node-Webkit?

My window and layout size settings in Construct 2 are set pretty small, since I am using pixel art. When I export with Node-Webkit and then launch, it starts out pretty small. Its not a big deal for me to just resize the window, but it would be nice to have something a little more professional. Like an option before it launches to set the window size, or say if I want it full screen or not.

Does anyone know of way to do this? Thanks.
B
4
Posts: 9
Reputation: 818

Post » Sat Jun 08, 2013 3:21 pm

There is a way to link a key to make the window fullscreen, like the "F" key.

I don't know precisely how to do what I am about to propose since I haven't attempted it yet, but I assume that you could make a trigger where, at the start of the layout, a text box appears asking if you would like fullscreen. If the person selects "yes," yes could be made to be the equivalent of pressing "F," and would therefore (theoretically) make the window fullscreen.

I might be way off base here, but it seems plausible to me.
B
6
S
1
Posts: 62
Reputation: 532

Post » Sat Jun 08, 2013 3:23 pm

There's a 3rd party node webkit plugin that allows you to change the window size, but you can't retrieve the screen size to position it in the center...Ashley's been talking about an official node webkit plugin for this stuff for ages but I haven't seen anything...
Image
B
240
S
29
G
13
Posts: 1,787
Reputation: 18,635

Post » Sun Jun 09, 2013 6:27 am

Guys,

On Start of layout, Browser -> request full screen worked the last time I checked node webkit and I was fairly impressed with it.
ImageImage
B
109
S
23
G
7
Posts: 1,062
Reputation: 12,708

Post » Sun Jun 09, 2013 8:06 pm

Yeah, but still needs a way to resize to a specific size you want and potentially lock it in that size to allow only specific sizes when it's not fullscreen.

I have a game that is Gameboy resolution (because I can) and you have to manually resize it to be bigger. I would love to have a 1x,2x,3x,4x,fullscreen option for it.
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Sun Jun 09, 2013 8:47 pm

You could just scale up your graphics to the appropriate size but I get what you mean. It would be a nice option.
ImageImage
B
109
S
23
G
7
Posts: 1,062
Reputation: 12,708

Post » Thu Jun 27, 2013 9:52 pm

Cool, thanks for the replies everyone. I will try some of those suggestions out. Genki, Maybe that request full screen request will work.

My buddy pointed out the layout scale function, which I didn't know about before, but has worked well for just getting my game to boot up at a decent(presentable) size.

I guess if you are running the game in windowed mode, its not a big deal to just resize the window to whatever size you want, but it would be nice to give the player the option to switch to FullScreen mode and back from within the game/menus.
B
4
Posts: 9
Reputation: 818


Return to How do I....?

Who is online

Users browsing this forum: istero, ManuelPerez, mekonbekon, tarek2, Yahoo [Bot] and 7 guests