Change Window Size on Layout Change

Get help using Construct 2

Post » Tue May 08, 2012 10:59 pm

Hi,

any solution for this?
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Tue May 08, 2012 11:14 pm

I don't think so.
The window size is a set property of the project, it is the size of the canvas in the browser.
Changing its size ends up in reinitialising the canvas. I'm not sure it can be made "on the fly".

You can always use the request fullscreen action from the browser object that will go from "windowed" to a complete full screen, but you can't actualy change the resolution at that moment.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Wed May 09, 2012 4:19 am

There was a javascript project I came across recently that makes good use of multiple, resized browser windows and I think it's nice to be able to do the same with C2.

While I don't think the multiple windows would be possible in just a single C2 project, I think it'd be possible to use the Call Javascript plugin and Window.resizeTo to resize the browser window.

EDIT: Sorry, just realized this can't be done so easily. The method won't allow you to change the size of the main window, but it can be used to create a new window and alter its size.
https://developer.mozilla.org/en/DOM/window.resizeToUgotsta2012-05-09 04:32:31
B
126
S
7
G
4
Posts: 185
Reputation: 7,233

Post » Wed May 09, 2012 12:02 pm

thanks for the information. :)
B
15
S
3
G
5
Posts: 396
Reputation: 4,977


Return to How do I....?

Who is online

Users browsing this forum: Televangelist and 29 guests