Prevent window scaling?

Discussion and feedback on Construct 2

Post » Thu Aug 22, 2013 10:54 pm

Hi all, this is my first post, so I hope I'm posting this in the right section.

Is it possible to prevent window scaling when compiling the game to EXE? If not, then I'd just like to suggest implementing more control over such things (in the future/before christmas/etc).
B
16
S
7
G
1
Posts: 161
Reputation: 3,131

Post » Sat Aug 24, 2013 10:16 am

@pirx
Hi. It's not perfect but you can do a thing like this:

Global number wHeight=0
Golbal number wWidth=0

System|On start of layout
    set wHeight to WindowHeight
    set wWidth to WindowWidth

Browser|On resized
    Execute javascript "window.rezizeTo(" & wWidth & ", " & wHeight & ");"

(or System|Every tick
        Execute javascript "window.onresize = function(){
            window.resizeTo(" & wWidth & "," & wHeight & ");
        };")

And if you set the project's properties with Scale inner or Letterbox scale, you can't see objects outside the scope. I think it's a good solution.

I don't know if there is a better option to do that, but it will be a good feature if not.PaulPoy2013-08-24 10:24:12
B
34
S
9
G
1
Posts: 47
Reputation: 4,612

Post » Sun Aug 25, 2013 5:53 pm

Thanks for the solution, it might come in really handy!

Admittedly it's not a matter of life and death for me but this free scaling can cause issues.

It would be really good to have a window-mode setting, something like: scalable/full-screen/fixed.
B
16
S
7
G
1
Posts: 161
Reputation: 3,131


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 21 guests