#How do I make a UI which "scrolls" up by however many lines is needed to accommodate a new message?

1 messages · Page 1 of 1 (latest)

grizzled bronze
#

Like in the attached image

Like a console? When there is a new message the previous ones are pushed up by however many lines are needed to accommodate the new message
The console logs the stages in the opening sequence of a blast door. it is purely decorative

Since the opening sequence is the same every single time I could just change the text after each action is completed like:

Set text to "Open sequence initiated."
Set text to "Open sequence initiated. Blast door B1 opening."
Set text to "initiated. Blast door B1 opening. Task complete."
Set text to "opening. Task complete. Blast door B2 opening."
Set text to "Task complete. Blast door B2 opening. Task complete."
Set text to "opening. Task complete. Open sequence complete."
This would give the desired effect

However there is a feature I want to add for when someone tries to initiate an opening sequence while one is already in progress. The console updates to say "Cannot initiate open sequence - one already in progress."

The solution above wouldn't have this.

#

gui help told me to post here

pseudo jackal
#

can i see the code you're currently using for this

#

?

grizzled bronze
#

Not using any code

#

The image just shows the desired effect

pseudo jackal
#

Ohhhhhh hmm

grizzled bronze
#

I'd like a single surface UI which updates in that manner

#

I have no idea how to approach this

pseudo jackal
#

u could use a scrolling frame with a canvas size of 0

grizzled bronze
#

So I put a textbox in the scrolling frame?

pseudo jackal
#

let me check

grizzled bronze
#

How exactly would I update the screen? Do I append text onto textbox.Text like

textbox.Text = textbox.Text + "New message"
#

The issue with that would be after many open sequences there would be like 100s of lines stored in the textbox right?

pseudo jackal
#

Okay wait, do you want to do this in one textbox or in mutliple?

austere spindle
#

The easiest way for this that I can quickly think off is maybe making each text one text label independently and appending it to a scroll controller