Setting text alignment in event sheet

Discussion and feedback on Construct 2

Post » Tue Jun 09, 2015 9:30 pm

From what I can see, there is no way to set the vertical and horizontal alignment of text from an event sheet. Can this be a thing?
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Tue Jun 09, 2015 10:31 pm

I haven't tried this, so apologies if it doesn't work. You can't do it directly, but you can access textHeight and textWidth of the actual displayed text.

So if you want to set it at position(x,y) anchored centrally and it is anchored at (say) top/left you can do this by subtracting textWidth/2 from the x position and textHeight/2 from the y position
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

Post » Tue Jun 09, 2015 10:52 pm

@briggybros , try the Text Properties Behavior by rexrainbow.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
26
G
5
Posts: 1,146
Reputation: 9,829

Post » Wed Jun 10, 2015 4:33 pm

Would be nice just to have it as part of the text object, but this will do :P
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 23 guests