Announcement

Collapse
No announcement yet.

Format Text only accepting wildcards?

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

    Format Text only accepting wildcards?

    Sorry if I'm posting this twice but the Submit New Thread button didn't work?

    Every tutorial I've seen for format text you get a pink text input, however I do the same thing and just get a grey wildcard one that I can't attach a text thing to. It seems like the pink is the default behaviour? Can't understand what I'm doing wrong, grateful for any help!

    #2
    Hm, it seems that the behaviour of this node was improved recently and it now accepts floats and ints with no conversion (which is great!), but at the same time there is no auto-conversion for string variable anymore (the pink one).
    You can still do it manually by dragging a wire off your string and typing 'toText':

    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	23.7 KB
ID:	1118006

    edit: if you mouse-over the format node and hold ctrl+alt, you can see the old behaviour. The new wildcard thing means one can no longer enter default values. :| Oh, well.
    Last edited by Everynone; 11-07-2016, 04:28 AM.

    Comment


      #3
      New line

      Originally posted by Everynone View Post
      Hm, it seems that the behaviour of this node was improved recently and it now accepts floats and ints with no conversion (which is great!), but at the same time there is no auto-conversion for string variable anymore (the pink one).
      You can still do it manually by dragging a wire off your string and typing 'toText':

      [ATTACH=CONFIG]116564[/ATTACH]

      edit: if you mouse-over the format node and hold ctrl+alt, you can see the old behaviour. The new wildcard thing means one can no longer enter default values. :| Oh, well.
      I'm no expert, but doesn't this cause an issue with a well-known workaround to add new lines to text? What I have understood could be done with previous versions was, with a new pin you can add a word or whatever (like how you have "test"), and immediately after enter a 'shift-enter' so wherever "test" appears in the text, a new line will appear. It seems this can't be done anymore. Is this true?

      Comment


        #4
        Never tried that before but it seems to work:

        Click image for larger version

Name:	text.PNG
Views:	1
Size:	78.4 KB
ID:	1119182

        Comment


          #5
          OK, but what about text variables? I want the format text node to extract a wildcard from the variable and convert it to a new line. Like the variable would include "this is the first line<>this is the second line". The format text needs to convert <> to shift-enter.

          Comment


            #6
            Unsure whether this functionality is supported for the format node. What you could do, is to ParseIntoArray on your string and use the delimiter to split it into chunks of text --> loop and display one after another.

            Click image for larger version

Name:	intoarray.PNG
Views:	1
Size:	110.6 KB
ID:	1119184
            Last edited by Everynone; 12-01-2016, 10:54 AM.

            Comment


              #7
              Thanks. I'll check it out later.

              Comment


                #8
                I've been looking around how to get line breaks into text variables for a while now.
                I have my UI widget text populated by variables from my saveData. I would love to be able to have line breaks in these.

                I finally found the work around using Format Text referenced in this thread, but those threads are almost a year old now, and I stumbled onto this thread which strongly indicates that it doesn't work anymore thanks to the pins defaulting to wildcards.
                I thought I was doing something wrong too, as every tutorial I've seen they just default to Pink (for text).

                The above screenshot of breaking it into an array won't work for me, because I have a dedicated screen location whee I want my text, and it's a single variable.
                Suppose I could do some insanity of parsing it out so I can add in line breaks, and then re-combining them all again into a single variable.
                But that seems like a lot of unnecessary work though.work.

                Donno if making them wildcards by default is an "improvement" if it breaks the only method we had to insert line breaks into text variables.
                Wish they would just fix that...
                Good stuff in here otherwise though.

                Comment


                  #9
                  Another solution is to preformat you text in an external word processor. Upon importing the *.cvs, the line-breaking is preserved, like in this UMG widget:

                  Click image for larger version

Name:	text.png
Views:	1
Size:	66.4 KB
ID:	1119232

                  If you need to add line-breaks dynamically to the text, you can spawn TextBlocks in a loop to populate a VerticalBox, adding spacers in between, or adjusting the bottom padding.

                  Comment

                  Working...
                  X