Self-adjusting block text

  • 13 favourites

Attached Files

The following files have been attached to this tutorial:



Download now 172.01 KB


1,007 visits, 1,617 views


This tutorial hasn't been translated.


You have a game with a lot of text, and Do you want put in a beautiful frame? this is the solution!

You only need design a beautiful frame and take this steps!

I only working with default design, but imagine the possibilities.

First you need a 9 patch and text object.

Remember, the hotspot of both objects must to be Top left.... because if you use the center, the reference position for 9 patch can be lost, for example when you set size of the box of text.

In the event sheet you only need create a event with "Every tick" and put the following acts

-->9 patch "Set position to (Text.X-5, Text.Y-5)"

-->9 patch "Set size to (TextWitdth+15,TextHeigth+15)

(the numbers can be changed based your likes :D)

I have a example working, write something in the text box and press enter y voila! the 9 patch adjust to the text!

Thank you!



Download now 172.01 KB

  • Order by
Want to leave a comment? Login or Register an account!