Hello!
I’m trying to use RichTextBlock decorators to display input prompts (E.g. “Press [Gamepad Button]” prompts). As I’m mainly developing for PC, players will be able to use a gamepad or mouse and keyboard. As such, I’d like to have the prompt update depending on what device the player is using.
However, it doesn’t appear possible to change the ImageSet during runtime. Decorators appear to only be “fire-and-forget,” with no way to update, refresh, or recreate a specific decorator.
I could resort to just using a ton of WidgetSwitchers – one for every set of input glyphs – and flip between them at runtime based on the current gamepad, but that feels horribly inefficient.
I could try creating a special type of RichTextBlock subclass that could re-create decorators on command, but I’m not sure if that would be very efficient, either.
Does anyone have any suggestions on how to refresh decorators at runtime?
Thank you!