Text Scale

Get help using Construct 3!

Post » Fri Jun 02, 2017 8:46 am

Hello,

My project has lots of text. Sometimes the text is 5-6 words others its 10-12.
I use the text object and I would like to know if its possible to scale the text every time according to the content. Currently I do it manually on every event and its really annoying as I have to type the text in the scene and then see which is the maximum size the text size can have.
Is there any automatic way to scale the text to the maximum size it can go every time?
Thanks
@StylianosArts
Game studio with a portfolio of 4 Apple Featured games.
B
31
S
7
G
2
Posts: 111
Reputation: 2,422

Post » Fri Jun 02, 2017 6:45 pm

Just set the height and width to whatever number you want them to be.

Ex.
Image
B
3
Posts: 6
Reputation: 187

Post » Sun Nov 12, 2017 9:20 pm

You can use these two expressions:
"TextWidth
TextHeight
Return the size of the actual text content within the text object's rectangle. Note the Text object must be drawn before these have the correct values. If you set the text then immediately access these expressions, they won't yet have the correct value. Adding a 'Wait 0.1 seconds' action will usually solve this." (https://www.scirra.com/manual/116/text)
B
10
S
3
Posts: 48
Reputation: 746


Return to How do I...?

Who is online

Users browsing this forum: No registered users and 0 guests