Announcement

Collapse
No announcement yet.

Which UMG Widget is appropriate for displaying and wrapping text in a speech bubble?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Which UMG Widget is appropriate for displaying and wrapping text in a speech bubble?

    I'm trying to work out how exactly I can use UMG to build a speech bubble, and I've gotten as far as making a UMG widget, hooking that widget to a blueprint, then adding said blueprint to a character and aligning it so it appears over the character's head.

    However, I'm a little lost regarding the differences between all of the text widgets available- since this is intended to be part of a conversation system, I ideally need something which both resizes itself within a certain range (so bubbles grow as their contents increase), and wraps after a certain line length (so a sentence doesn't become one huge, screen-spanning line). The closest I've gotten to the desired effect is an EditableText widget with Size To Content and Is Read Only both set to true. However, it feels weird using something meant for input purely to display content- is there a better fit for this use case?

    #2
    Editable Text?

    Comment


      #3
      Hmm okay, so editable text set to read-only is the recommended method? That's an easy fix then, thank you

      Comment


        #4
        Originally posted by HInoue View Post
        Hmm okay, so editable text set to read-only is the recommended method? That's an easy fix then, thank you
        I wouldn't bother with Read-Only unless you have some sort of blueprint that can access the text while it's shown.
        What if you have to utilize the same speech bubble because the player writes faster than the bubble can disappear? You could reuse the same bubble.

        Comment


          #5
          Yep, that's the plan- I have a conversation manager class in C++ which curates text outputs, so I'm building a function in blueprint that changes the bubble's text to whatever my manager's output is, makes the bubble visible, counts a timer down, then hides the bubble. The actual widget is persistent, it just turns invisible whenever it's not in use.

          Comment

          Working...
          X