Skip to content

Commit

Permalink
Merge pull request #287 from DoomTas3r/type-in-tooltip
Browse files Browse the repository at this point in the history
Include type in tooltip
  • Loading branch information
wjt authored Oct 23, 2024
2 parents 0d90c15 + a66846a commit 7ac2a2b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion addons/block_code/ui/blocks/block/block.gd
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,13 @@ func _to_string():


func _get_tooltip(at_position: Vector2) -> String:
return definition.description if definition else ""
if not definition:
return ""

if definition.variant_type == Variant.Type.TYPE_NIL:
return definition.description

return "{description}\n\nType: [b]{type}[/b]".format({"description": definition.description, "type": type_string(definition.variant_type)})


func _make_custom_tooltip(for_text) -> Control:
Expand Down

0 comments on commit 7ac2a2b

Please sign in to comment.