How do I Scroll Text Up

Get help using Construct 2

Post » Tue Sep 06, 2016 8:10 am

Hey there,
I am trying to create a text window that will scroll up when I add a new line of text. Just like what you would see in any games chat window. I know that the TextBox object has an action for this but I can't use a TextBox because I don't want that big white background. How would I go about manually scrolling the text upward on a simple Text or Sprite Font Object?

Thank You,
Stephen
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Tue Sep 06, 2016 9:03 am

To add text to an already existing text or spritefont object you can use the append action :
newline & your_text_to_add

This will jump a line at the end of the text object and add your text.
Now the issue is that you may have to resize the object and position it so that it displays only the new text.

So another way is to do the opposite :
Your_text_to_add & newline & Text.text

This way, the new line will always be on top, but on the bottom you won't be able to slide down to see the previous text (the object is not really meant to do that).

As mentioned if you really want to allow for a complete slide, you have to resize the object and then allow it to slide, using possibly some layer mask to keep it in a certain position.

Example of masking and scrolling
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293


Return to How do I....?

Who is online

Users browsing this forum: Fenix18, tarek2 and 54 guests