How do I Find Devices Max Window Size

Get help using Construct 2

Post » Thu Apr 02, 2015 10:14 pm

Is there a way to find the maximum window size for the device you're using, during runtime and then setting the window to that size?
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Fri Apr 03, 2015 4:54 am

Hey @farflamex, :)

I'm not sure if this is what you're looking for, but the Browser object has expressions for screen width and height, as well as a "Request fullscreen" action.
B
27
S
18
G
8
Posts: 327
Reputation: 6,156

Post » Fri Apr 03, 2015 2:10 pm

Thanks. Actually I think just WindowWidth and the Viewport options do also correctly show the screen size, on phones at least. I'm tinkering around with a phone game but wasn't quite sure how the screen sized itself, but I think it's permanently set to whatever the max size of the phone is... I think.
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Sat Apr 04, 2015 10:05 am

i think you can use this :
width : ViewportLeft()+ ViewportRight()
height : ViewportBottom() + ViewportTop()
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
63
S
14
G
2
Posts: 291
Reputation: 6,641

Post » Sat Apr 04, 2015 10:08 am

puntodamar wrote:i think you can use this :
width : ViewportLeft()+ ViewportRight()
height : ViewportBottom() + ViewportTop()


More like ViewportRight()-ViewportLeft()
ViewportBottom()-ViewportTop()

(With the layer as a parameter)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, OBLIVION, tarek2 and 17 guests