File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
addons/block_code/ui/blocks/block Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -217,10 +217,18 @@ func _get_tooltip(at_position: Vector2) -> String:
217217 if not definition :
218218 return ""
219219
220- if definition .variant_type == Variant .Type .TYPE_NIL :
221- return definition .description
222-
223- return "{description} \n\n Type: [b]{type} [/b]" .format ({"description" : definition .description , "type" : type_string (definition .variant_type )})
220+ var lines : Array [String ]
221+
222+ lines .append (definition .description )
223+
224+ lines .append ("" )
225+ lines .append ("[code]{0} [/code]" .format ([definition .code_template .strip_edges ()]))
226+
227+ if definition .variant_type != Variant .Type .TYPE_NIL :
228+ lines .append ("" )
229+ lines .append ("Type: [b]{0} [/b]" .format ([type_string (definition .variant_type )]))
230+
231+ return "\n " .join (lines )
224232
225233
226234func _make_custom_tooltip (for_text ) -> Control :
You can’t perform that action at this time.
0 commit comments