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:
217
217
if not definition :
218
218
return ""
219
219
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 )
224
232
225
233
226
234
func _make_custom_tooltip (for_text ) -> Control :
You can’t perform that action at this time.
0 commit comments