Can't calculate window border size if 1080p or higher

Discussion and feedback on Construct 2

Post » Wed Oct 07, 2015 1:52 pm

@Ashley

I use NWjs.WindowWidth - WindowWidth to calculate the width of the window border so I can properly resize a window. Same for height. This has worked fine for all of my projects. However, my latest project that starts with a window size of 1920x1080 is giving me the wrong numbers; usually I get 16x39 but now I'm getting 123x39. It looks like the window is automatically resized if the game is launched at a resolution that matches or exceeds the screen's resolution, thus screwing up the borders somehow.

I'm not sure if this is a problem with C2, NWjs, or Windows...so I figured I'd post here before submitting a bug report. Thoughts?

You can see for yourself by using the .capx in this forum thread. Just run it and see what the border size text says. Then set the window size in the project properties to 1920x1080 (or your screen's resolution if it's larger) and run the layout again.
Image
B
242
S
29
G
13
Posts: 1,787
Reputation: 18,685

Post » Thu Oct 08, 2015 12:23 pm

File this as a bug report and I'll investigate soon.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240


Return to Construct 2 General

Who is online

Users browsing this forum: Darth Crusher and 12 guests