Announcement

Collapse
No announcement yet.

UMG Rich Text Box

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

  • [PLUGIN] UMG Rich Text Box

    Hey guys,
    I saw that some people want a multi-colored text in UMG, and I wanted that aswell, so I decided to pack it into a plugin. The RichTextBox is already available in the engine, but it is locked with UCLASS(Experimental). I copy/pasted those files inside new source files, removed the experimental tag, and packed it for a plugin, which works great.
    How it looks in UMG:

    It supports all colors (uses hex color codes + opacity) and all font styles the selected font has. How the formatting works:
    It uses <span> for it's formatting. The hex codes are built the following way: #RRGGBBAA (red - green - blue - alpha / opacity, ranging from 0 to F). Examples for formatting:
    Code:
    <span color="#ffffffff">This is a white text.</>
    <span color="#ff0000ff">This is a red text.</>
    <span color="#ffff0066">This is a yellow text with 50% opacity.</>
    
    <span style="bold">This is a bold text.</>
    <span style="italic">This is an italic text.</>
    <span style="bold italic">This is a bold italic text.</>
    
    <span color="#0000ffff" style="bold">This is a blue bold text.</>
    The font styles such as "bold" or "italic" must have the same name in your font you put inside the TextBox.

    Download: Click here
    Installation: Put the folder UmgRichTextBox inside the downloaded zip into your project's Plugins folder (if thats not existing, create it!).

    Hope you like this plugin (even though my own work is 0% )!
    Hobby game developer from Germany Follow me on Twitter!
    Stuff I made:
    Steam Workshop Tutorial/Wiki
    Making a full working translation for your game and change it at runtime
    GitPush plugin
    Multi-colored text in UMG

  • #2
    Wow, I was needing this just yesterday.

    It looks very promising, I'm going to give it a go and tell you how it goes.

    Thank you so much dear sir

    EDIT: I wonder if I can format this using Blueprints only.
    Last edited by Yun-Kun; 03-27-2016, 07:26 AM.
    [WIP - Plugin] Multiplayer Combat Editor
    A-RPG Sacred Swords
    Youtube Tutorials

    Comment


    • #3
      Originally posted by Yun-Kun View Post
      EDIT: I wonder if I can format this using Blueprints only.
      It has a "Set Text" blueprint node, so setting the content with blueprints is possible, and it should also parse it instantly (the best thing there is the Format Text).
      Hobby game developer from Germany Follow me on Twitter!
      Stuff I made:
      Steam Workshop Tutorial/Wiki
      Making a full working translation for your game and change it at runtime
      GitPush plugin
      Multi-colored text in UMG

      Comment


      • #4
        Working instantly as planned. Easily setup, easily used. Thank you so much
        Attached Files
        Last edited by Yun-Kun; 03-27-2016, 08:39 AM.
        [WIP - Plugin] Multiplayer Combat Editor
        A-RPG Sacred Swords
        Youtube Tutorials

        Comment


        • #5
          That looks cool!!
          Hobby game developer from Germany Follow me on Twitter!
          Stuff I made:
          Steam Workshop Tutorial/Wiki
          Making a full working translation for your game and change it at runtime
          GitPush plugin
          Multi-colored text in UMG

          Comment


          • #6
            This is awesome, Thanks

            Comment


            • #7
              I tried doing this same thing but it doesn't seem to recognize <span> but instead makes an error message about slate styles.

              Comment


              • #8
                Originally posted by Au-heppa View Post
                I tried doing this same thing but it doesn't seem to recognize <span> but instead makes an error message about slate styles.
                In my plugin or did you try that on your own?
                Hobby game developer from Germany Follow me on Twitter!
                Stuff I made:
                Steam Workshop Tutorial/Wiki
                Making a full working translation for your game and change it at runtime
                GitPush plugin
                Multi-colored text in UMG

                Comment


                • #9
                  Your plugin. Thanks a bunch, by the way

                  I got it working in the editor. I guess I needed to restart the editor for the it work properly or I had goofed something and not changed the text field to richtext after all.

                  But it doesn't seem to get packaged which is what I am trying to trouble shoot on other threads (plugins not packaging seems to be an issue that has been happening with other people).

                  Comment


                  • #10
                    You need to go into your ProjectName.Build.cs and uncomment the line with Slate and SlateCore. If you can't find the file, add a empty class to the project so it generates it.
                    Hobby game developer from Germany Follow me on Twitter!
                    Stuff I made:
                    Steam Workshop Tutorial/Wiki
                    Making a full working translation for your game and change it at runtime
                    GitPush plugin
                    Multi-colored text in UMG

                    Comment


                    • #11
                      There was no commented out line with Slate or SlateCore but I assume it should be

                      Code:
                      PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
                      It didn't do it, though. When I press Launch or try packaging the game it wont show the RichText panel. It does show it when I Play the map from the editor. I have been trying to go through the other threads where people have had similar problems but a lot them seem to be about the project not being C++ project.

                      Comment


                      • #12
                        Originally posted by Au-heppa View Post
                        There was no commented out line with Slate or SlateCore but I assume it should be

                        Code:
                        PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
                        It didn't do it, though. When I press Launch or try packaging the game it wont show the RichText panel. It does show it when I Play the map from the editor. I have been trying to go through the other threads where people have had similar problems but a lot them seem to be about the project not being C++ project.
                        Hm, thats strange... Try creating a C++ project and adding the plugin, but my project I tested it on is also a blueprint-only project and it works fine..
                        Hobby game developer from Germany Follow me on Twitter!
                        Stuff I made:
                        Steam Workshop Tutorial/Wiki
                        Making a full working translation for your game and change it at runtime
                        GitPush plugin
                        Multi-colored text in UMG

                        Comment


                        • #13
                          Originally posted by iUltimateLP View Post
                          Hm, thats strange... Try creating a C++ project and adding the plugin, but my project I tested it on is also a blueprint-only project and it works fine..
                          My project is C++ project. Using C++ project instead of BP one was one of the suggestions on other forums, too. Another one was that I should put it in the Game folder instead of Engine folder for plugins, which I had also already done.

                          Comment


                          • #14
                            Okay, adding "UmgRichTextBox" as a dependency module seemed to do the trick.

                            Comment


                            • #15
                              No packaging problems here on a full blueprint project.

                              Just so you know
                              [WIP - Plugin] Multiplayer Combat Editor
                              A-RPG Sacred Swords
                              Youtube Tutorials

                              Comment

                              Working...
                              X