Rich text on UI Label
Posted: Sun Nov 27, 2022 2:08 am
I'm trying to add GPS ping to my UI. The GPS tag can display fine. But it's not clickable. Then I tried adding a coal item rich-text. Hovering on that didn't trigger the popup of the coal item tag.
The item and entity tags in Tip and Trick work perfectly fine. Hovering them show the item/entity popup.
I couldn't spot anything odd in ctrl+f6 UI debug.
Am I missing something? I tried it on other UI types, textfield and text-box, as well. They didn't work.
The item and entity tags in Tip and Trick work perfectly fine. Hovering them show the item/entity popup.
I couldn't spot anything odd in ctrl+f6 UI debug.
Am I missing something? I tried it on other UI types, textfield and text-box, as well. They didn't work.



Code: Select all
local tabbed_pane = main_window.add{ type="tabbed-pane", name='main-tab' }
local pane= tabbed_pane.add{type="tab", caption="Help", name='help-tab'}
local help_msg = pane.add { type="label", caption={'gui-army.cc_description3'}}
help_msg.style.rich_text_setting = defines.rich_text_setting.highlight
Code: Select all
cc_description3=When the command center is idle for 5 minutes, they will unlink to preserve game performance. [gps=0,0] [item=coal]