Skip to content

Commit 6a05c62

Browse files
authored
Merge pull request #235 from endlessm/push-mtvutpttoowm
block: Show tooltips for blocks
2 parents 6d0d0f1 + b9fa778 commit 6a05c62

File tree

1 file changed

+4
-0
lines changed
  • addons/block_code/ui/blocks/block

1 file changed

+4
-0
lines changed

addons/block_code/ui/blocks/block/block.gd

+4
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ func _to_string():
207207
return "<{block_class}:{block_name}#{rid}>".format({"block_name": definition.name if definition else "", "block_class": get_block_class(), "rid": get_instance_id()})
208208

209209

210+
func _get_tooltip(at_position: Vector2) -> String:
211+
return definition.description if definition else ""
212+
213+
210214
func _make_custom_tooltip(for_text) -> Control:
211215
var tooltip = preload("res://addons/block_code/ui/tooltip/tooltip.tscn").instantiate()
212216
tooltip.text = for_text

0 commit comments

Comments
 (0)