Hi guys,
Bit of a tricky one to explain however I’ll give it a go.
I currently have a text box inside a scroll box, the text box is binded to show formatted text that will always be changing depending on selections.
What I’m looking to do is add a button beside a certain thread of the text but I need this button to work like the text in the scroll box. So for example if I scrolled down, the text and the button need to be moving together.
In the photo example you can see what the scroll box looks like before a player makes choices, then after they have made choices and were the buttons should be and lastly after the choice and the scroll box has scrolled down the buttons should still be aligned with that text.
add a wrap box to be a child of the scrollbox.
then make a new widget containing nothing but a multi line text box, and make one containing a multi line text box and a button. make sure to set your line break behavior correctly, otherwise things may bug out weirdly.
make an enum to help you differentiate what type of item you are dealing with, and create the widgets accordingly; something that doesnt have any interaction would just get added to the existing multi line text box using an append node, while something that does have interaction would be created as a new widget entirely. if you wanted to, you could create each entry as a unique widget, and while honestly it would probably be fine for performance, if you can save 0.1ms you may as well right. it all adds up.