Download

Tooltip Rich Text Decorator

Hi all,

I have a requirement that should be fairly straightforward but tackling it has proven difficult.

In my game I will have some text that, for example, look like this

“Hello there, welcome to {PlaceName}”

I want {PlaceName} to be replaced with a variable from a stringtable at runtime, and the user can mouse over that world, but only that word, to get a tooltip that gives them a definition.

I sort of got this working by making a special tooltip text widget, but I need it to be inline so that I can get wrapping working seamlessly on big dialogue boxes.

My understanding from Advanced Text Styling with Rich Text Block - Unreal Engine is that the ideal way to achieve this is with a RichTextBlock and a custom decorator. If anyone has any experience or other suggestions on how to achieve this I would be greatly thankful!

I suppose more succinctly the question is, how does one derive the decorator to allow the ability to inline widgets in a rich text block. It is remarkably difficult to find examples of the decorator in use!

Did you ever figure it out?

Sorry for the bump, but I’m curious if anyone knows how to do this. It’s something that CRPGs are doing, like Pillars of Eternity and Tyranny, and it seems like a good way of giving more information during dialogue without needing to shoehorn definitions and background info into the dialogue itself.