3D rich text view


#1

Just finished porting my rich-text view to Urho3D.

The view renders very similar to the Text3D component, however its structured as a list of subwidgets that can render a specific type - image, text, video, custom.


#2

Interesting. It adds a lot to the UI. Nice effects!


#3

I will probably share the code when I get it done and clean. I’ve tried keeping it clean but its a port from another project and there are leftovers from there.


#4

Wow, this is really amazing! It would be cool to see something like this as part of standard Urho3D :slight_smile:


#5

Yes indeed, rich text is very useful, for instance in chats…


#6

Like to see it integrated into the main branch


#7

Looks very good.
Don’t hesitate to share your non-perfect code. An enthused passerby might feel like polishing it, save you some time, do so in a jiffy with helpful remarks.


#8

Almost done cleaning up the code and adding more features (line/character spacing). The rich-text view now supports different fonts. In my previous project it was able to load system fonts on Windows and Linux recognizing bold-italic fonts too…I’m not sure how this works with this project license. I’m planning more features like typewriting/morphing effect. I’m not sure if this code should go into the main branch, I consider it more like an utility project but lets see how it goes :slight_smile: I would definitely appreciate some help, so I’ll make it public asap


#9

I was busy lately but I found some spare time to rework this. Properties needs to be exposed and the HTML parser has to be rewritten from scratch


#10

I’m eager to try it! But where’s the link?


#11

Sorry no link yet, just announcing my progress, I’ll commit in my repo very soon


#12


#13

Offtopic question - how many bones do you have on female model on your screenshot?


#14

Can’t tell exactly, you can find it in Urho3D/Data/Models/Kachujin/


#15

I’ve finished the markup parsing yesturday, here’s the result:

Supported tags:
  <br> - line break
  <b></b> - bold
  <i></i> - italic
  <color=#FF800000></color> - change text color, supports 24/32 bit hex and color names
  <size=14></size> - change text size in pixels
  <font=Fonts/Annonymous Pro.ttf></font> - change text font
  <img src=image.png width=320 height=240 /> - embed an image

The markup parser supports nesting, the text on above screenshot has this source:

<color=blue><color=red>red<br><color=green>green</color><br>red1</color><br>blue1<br>blue2</color><color=orange>orange</color><size=10>size=10</size><br><img src=Textures/Logo.png width=120 height=50 />123

I only need to fix the coding style to match the Urho3D conventions and I’ll PR this


#16

Good. I see it good-looking in a ghost-in-the-shell like environment, filling out all that living wall with giant ads, you know…


#17

…or scrolling RSS feed on the bottom of the screen with something important :wink:


#18

That is a good feature. Hope to see it in the main branch soon.


#19

First commit separated from my code, expect some minor flaws and bugs, the code needs more cleanup.


#20

Looks absolutely great ! Are there any plans for a 2d version too ?