Rich Text Lable: Draw text over Image

Godot Version

4.2.2

Question

I want to have an image and have a text, that is written over that image (Icon). Both of them are in the same Rich text Lable. The image using the [img] text and the text as normal text.

How can I achieve this? Thanks for any help!

I achieved a very similar result by making a custom scene that contains a Label and a Sprite2D.

1 Like

Thanks that’s an interesting Solution, but how did you include the scene in a RichTextLabel?

I didn’t. The Label overlaid the Sprite2D:

image

The scene tree for this custom component looks like:

image

1 Like

Ok thanks for your help! Sadly that doesn’t work in my case.
But I could just make a scene that generates images text and save that as a texture. Then I could just put it in an Image tag in the rich text Lable.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.