[Request] Node Webkit window controls

Discussion and feedback on Construct 2

Post » Thu Jul 18, 2013 7:31 pm

There's a 3rd party plugin for some Node Webkit-specific features including window controls but it doesn't work with 'minify script' enabled and 'resize window' seems to be off a bit..I tried inputting the different resolutions myself, and also tried retrieving the window size at start then multiplying it, but neither are accurate.

Could these window controls be added to the official node webkit plugin?
(Set width, set height, get width, get height, set x, set y, disable resize, etc.)

Also is there any way to retrieve the user's screen size? There's no way to center the window after resizing it without this.

Also would it be possible to adjust the "window size" even in full-screen? That was pretty cool in CC.MadFactory2013-08-17 05:07:12
Image
B
234
S
27
G
13
Posts: 1,784
Reputation: 18,274

Post » Thu Jul 18, 2013 7:45 pm

I agree, it's about time these features were added ;)
B
92
S
30
G
24
Posts: 3,191
Reputation: 32,584

Post » Thu Jul 18, 2013 8:49 pm

I also would really like this implemented - I tried the third party plugin but it has bugs and doesn't work with my game at all.
Moderator
B
91
S
32
G
33
Posts: 3,005
Reputation: 27,552

Post » Thu Jul 18, 2013 11:32 pm

Window size and position options can be added to the "package.json" file in the Construct 2\exporters\html5\node-webkit folder.
(Make sure you back the original)

I added a max/min window size to a modded "package.json" file to stop the user resizing the game (works).

{
     "main": "index.html",
     "name": "[[[name]]]",
     "description": "[[[description]]]",
     "version": "[[[version]]]",
     "window": {
          "icon": "logo.png",
          "toolbar": false,
          "width": 960,
          "height": 640,
          "position": "center",
          "min_width": 960,
    "min_height": 640,
    "max_width": 960,
    "max_height": 640,
          "show": false
     },
     "chromium-args": "--disable-extensions --disable-plugins --disable-internal-flash --disable-popup-blocking --enable-gamepad --enable-html5-camera --allow-file-access-from-files"


Not sure if it works with mimified...not tested it.

GITHUB

Hope this helps.
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,876

Post » Fri Jul 19, 2013 1:28 am

That's not the issue - we want to change it at runtime, rather than just at the start.
Moderator
B
91
S
32
G
33
Posts: 3,005
Reputation: 27,552

Post » Fri Jul 19, 2013 1:32 am

This is essential, would be even better if it let you change the resolution as well while fullscreen so that performance doesn't decrease as much.

Also an option to disallow window resizing (or have it remember the size).alspal2013-07-19 02:05:01
B
141
S
68
G
17
Posts: 1,769
Reputation: 20,224

Post » Fri Jul 19, 2013 2:31 am

Add me to the list of people who would really like to see these features.
B
77
S
49
G
35
Posts: 358
Reputation: 22,433

Post » Fri Jul 19, 2013 2:56 am

I'm in too.
ImageImageImageImage
B
155
S
61
G
41
Posts: 2,577
Reputation: 34,324

Post » Fri Jul 19, 2013 9:27 am

+1
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180

Post » Thu Jul 25, 2013 5:01 pm

This is an essential feature for C2 imo. HTML5 is one thing, but Construct could be a big deal in the desktop game market if it wants to be. It's just missing a few important bits like this!

+1
B
19
S
7
G
10
Posts: 82
Reputation: 4,996

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests