diff options
| author | Radio <radiohotline@disroot.org> | 2026-06-04 15:15:11 +0300 |
|---|---|---|
| committer | Radio <radiohotline@disroot.org> | 2026-06-04 15:15:11 +0300 |
| commit | 9d74b49ab62908d4acf53dde444413886b8b28e5 (patch) | |
| tree | 0cb785267ea7e239b19d88684c0d64b9bd5d52f0 /addons/escoria-ui-simplemouse/tooltip/tooltip_target.gd | |
| parent | 2c85d452ad02a5f89cd43bad7f9de31d0e4fa0c1 (diff) | |
escoria setup and old branch archives
Diffstat (limited to 'addons/escoria-ui-simplemouse/tooltip/tooltip_target.gd')
| -rw-r--r-- | addons/escoria-ui-simplemouse/tooltip/tooltip_target.gd | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/addons/escoria-ui-simplemouse/tooltip/tooltip_target.gd b/addons/escoria-ui-simplemouse/tooltip/tooltip_target.gd new file mode 100644 index 0000000..c975b30 --- /dev/null +++ b/addons/escoria-ui-simplemouse/tooltip/tooltip_target.gd @@ -0,0 +1,28 @@ +extends ESCTooltip + + +signal tooltip_size_updated + + +func update_tooltip_text(): + # Need to update size of bbcode rect before updating the text itself otherwise on the + # first frame the text is wider than the default of 0 and ends up being really tall + # and setting the wrong vertical margin for the tooltip + update_size() + + # We signal this here since the processing in this class happens AFTER input + # processing. We signal here to avoid "lagging" behind a frame since + # tooltips are presently dependent on the size of the bounding box around + # the rendered string. + tooltip_size_updated.emit() + + text = "[center]" + text += "[color=#" + color.to_html(false) + "]" + text += current_target + text += "[/color]" + text += "[/center]" +# push_align(RichTextLabel.ALIGN_CENTER) +# push_color(color) +# append_bbcode(current_target) +# pop() +# pop() |
