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-keyboard-9verbs/tooltip | |
| parent | 2c85d452ad02a5f89cd43bad7f9de31d0e4fa0c1 (diff) | |
escoria setup and old branch archives
Diffstat (limited to 'addons/escoria-ui-keyboard-9verbs/tooltip')
3 files changed, 49 insertions, 0 deletions
diff --git a/addons/escoria-ui-keyboard-9verbs/tooltip/action_target_tooltip.tscn b/addons/escoria-ui-keyboard-9verbs/tooltip/action_target_tooltip.tscn new file mode 100644 index 0000000..ab5d677 --- /dev/null +++ b/addons/escoria-ui-keyboard-9verbs/tooltip/action_target_tooltip.tscn @@ -0,0 +1,14 @@ +[gd_scene load_steps=2 format=3 uid="uid://yv8r2xh0jvft"] + +[ext_resource type="Script" uid="uid://bxwtb3w78gtbe" path="res://addons/escoria-ui-keyboard-9verbs/tooltip/tooltip_action_target.gd" id="1"] + +[node name="tooltip" type="RichTextLabel"] +anchor_right = 1.0 +anchor_bottom = 1.0 +bbcode_enabled = true +text = "[center][/center]" +scroll_active = false +script = ExtResource("1") +__meta__ = { +"_edit_use_anchors_": false +} diff --git a/addons/escoria-ui-keyboard-9verbs/tooltip/tooltip_action_target.gd b/addons/escoria-ui-keyboard-9verbs/tooltip/tooltip_action_target.gd new file mode 100644 index 0000000..8fcd477 --- /dev/null +++ b/addons/escoria-ui-keyboard-9verbs/tooltip/tooltip_action_target.gd @@ -0,0 +1,34 @@ +extends ESCTooltip + +@export var prepositions = {"use": "with", "give": "to"} + +func update_tooltip_text(): + text = "[center]" + text += "[color=#" + color.to_html(false) + "]" + if !current_action.is_empty(): + text += current_action + "\t" + text += current_target + + if waiting_for_target2 and current_target2.is_empty(): + current_prep = prepositions.get(current_action, current_prep) + text += "\t" + current_prep + " \t" + + if !current_target2.is_empty(): + text += "\t" + current_prep + " \t" + current_target2 + + text += "[/color]" + text += "[/center]" + +# push_align(RichTextLabel.ALIGN_CENTER) +# if !current_action.empty(): +# add_text(current_action + "\t") +# +# add_text(current_target) +# +# if waiting_for_target2 and current_target2.empty(): +# add_text("\t" + current_prep) +# +# if !current_target2.empty(): +# add_text("\t" + current_prep + "\t" + current_target2) +# +# pop() diff --git a/addons/escoria-ui-keyboard-9verbs/tooltip/tooltip_action_target.gd.uid b/addons/escoria-ui-keyboard-9verbs/tooltip/tooltip_action_target.gd.uid new file mode 100644 index 0000000..b715479 --- /dev/null +++ b/addons/escoria-ui-keyboard-9verbs/tooltip/tooltip_action_target.gd.uid @@ -0,0 +1 @@ +uid://bxwtb3w78gtbe |
