Dynamic Resizing of UI elements by canvas dimen.

Get help using Construct 2

Post » Wed Dec 04, 2013 1:39 am

i know there's in JS the ability of dynamic sizing of UI elements based on the canvas dimensions of the mobile phone like 90% of screen width for a button.

I like to know if there's something comparable in C2?? or a plugin to provide that ability?
B
5
S
1
Posts: 78
Reputation: 556

Post » Sat Dec 07, 2013 9:48 pm

You can check for the height and width of the display and layout.

scirra.com/manual/126/system-expressions (sorry, I'm not aloud to post full URLs)

These values change when setting your project to fullscreen.
Set the width, height and position of your objects to relative values instead of fixed values and it should work.

(I've done this with size only, but it logically should also work with position)
B
8
S
2
Posts: 26
Reputation: 604

Post » Sat Dec 07, 2013 9:55 pm

There also seems to be built in support of some kind for this:

scirra.com/tutorials/73/supporting-multiple-screen-sizes/page-2

I think I would still use the manual sizing and positioning to make everything responsive to many screensizes and retain full control over values.

Please correct me if I'm mistaking on anything dear forum members.
I've only been working with C2 for a couple of weeks.
B
8
S
2
Posts: 26
Reputation: 604


Return to How do I....?

Who is online

Users browsing this forum: AlexiarTW and 6 guests