Announcement

Collapse
No announcement yet.

Changing text outline color using blueprints.

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

    Changing text outline color using blueprints.

    Basically is it possible to change the outline color of a text using blueprints? For example when you hover a button.
    Click image for larger version

Name:	4r.png
Views:	72
Size:	48.5 KB
ID:	1707160

    #2
    Hi, set the outline color to white, then create a new material and assign that as the Outline Material.

    Click image for larger version

Name:	dynamic_outline_color.png
Views:	54
Size:	31.6 KB
ID:	1707551
    Then when you construct the widget use the "Get Dynamic Outline Material" on the text and save the output into a variable. Then you can change the color of the material if you set it to a parameter in the material editor (so "Set Vector Parameter Value" from the material you saved earlier into a variable)
    Click image for larger version

Name:	outline_mat.png
Views:	45
Size:	29.5 KB
ID:	1707552

    Comment


      #3
      Um... I don't know if I'm doing it wrong but I can't use the "get dynamic outline material" in any way. Is it not supported on 4.16? (cuz that's the version I'm using)
      Click image for larger version

Name:	Bez tytułu.png
Views:	50
Size:	86.2 KB
ID:	1707658

      Comment


        #4
        I'm using this only since 4.24 so I don't know whether or not this will work with earlier engine versions.

        Also you have a "Text Reference" I have a "Text Object"
        Click image for larger version

Name:	get_dynamic_outline_material.png
Views:	48
Size:	44.9 KB
ID:	1707674
        What text are you using? I'm using plain text
        Click image for larger version

Name:	text_I_used.png
Views:	39
Size:	15.4 KB
ID:	1707675

        Also you could try setting the font every time you want to change the outline color (but can't guarantee that those nodes exist in 4.16)
        Click image for larger version

Name:	set_font.png
Views:	39
Size:	166.7 KB
ID:	1707676

        Comment


          #5
          1 Ye this node just doesn't exist in 4.16
          2 I'm using the same thing it just looks different in 4.16
          3 I've tried using that method... but it just doesn't update after changing once (while other variables do)

          Comment


            #6
            Can you show your code how you set the outline color? And you have to run this whole code every time you want to change the Outline Color (so I would make a new function, called something like "Set New Outline Color", and input a linear color there, and you would have to call that function every time you want to change the Outline Color)

            Comment


              #7
              And the rest clearly works cuz for example the element image and element name are updating every time and outline color is always what I first set it to.
              Attached Files

              Comment


                #8
                Try printing the color, so in the function print the "Color" you plug into "Outline Color" and see if the "Color" changes.

                Comment


                  #9
                  It seems like it does...I have no clue why the outline doesn't work...Click image for larger version

Name:	Bez tytułu.png
Views:	31
Size:	45.6 KB
ID:	1708181

                  Comment


                    #10
                    What I would try next is building a minimal widget and set the color there.
                    So a blank widget that only contains one single text -> crank up the outline size of the text and on construct of the widget set the outline color to something different and see if that works (with and without a delay node between the construct and the set outline color, shouldn't make any difference but just to be sure).

                    Comment


                      #11
                      Ok um, I just made it so the text will change and the outline will stay the same. it looks fine that way too... It was just all too buggy... but thank you for your help ^^

                      Comment

                      Working...
                      X