Is there an auto-center positioning for UI element

Get help using Construct 2

Post » Wed Dec 04, 2013 2:38 pm

Is there an auto-center positioning feature for UI elements??
B
5
S
1
Posts: 78
Reputation: 556

Post » Wed Dec 04, 2013 2:45 pm

No, but that's because Construct2 has no specific UI elements feature.

It is easily done by events though.

ui element set x : viewportleft(0)/2

this will only work if the origin of the UI element is in it's center.LittleStain2013-12-04 14:46:48
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Dec 04, 2013 2:52 pm

good tip
B
5
S
1
Posts: 78
Reputation: 556

Post » Wed Dec 04, 2013 2:54 pm

how do i set or actual check the origin of the UI element is in it's center.
B
5
S
1
Posts: 78
Reputation: 556

Post » Wed Dec 04, 2013 2:57 pm

in the properties panel you can set the object's hotspot to center.

also in the image editor you can set the sprite's origin wherever you want.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Dec 04, 2013 3:18 pm

if it is not in the center, but top-left use viewportleft(0)/2-sprite.width/2mindfaQ2013-12-04 15:18:42
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Wed Dec 04, 2013 3:34 pm

thats good to know.
B
5
S
1
Posts: 78
Reputation: 556


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests