Godot Version
v4.3.stable.official [77dcf97d8]
Question
Good late night everyone.
I am trying to be professional and organized while writing my code base.
I recently watched a youtube video from “Indently” titled “How To Write Better Functions In Python” - link (https://youtu.be/mSoEjBpJUJ0?si=hkj6ibGR43G-kNCL)
In that video, he showed that custom comments could be added to the tool tip pop up when hovering over the function.
I got it to write the custom details about my function but I am unsure of how to do it with multiple lines of text.
My function is the following …
##
##Use this function to pick a random Shape and Color combo from the ENUM lists
##
##Example Output:
##res://Assets/Icons/SQUARE_RED.png
##
func pick_random_tile(shape=TILE_SHAPE.keys(), color=TILE_COLOR.keys()) -> Texture:
#example path = load("res://Assets/Icons/"Diamond_BLUE.png")
var generated_tile_path = "res://Assets/Icons/" + shape[randi() % TILE_SHAPE.size()] + "_" + color[randi() % TILE_COLOR.size()] + ".png"
var texture = load(generated_tile_path)
print(generated_tile_path)
print(typeof(texture))
return texture
When I hover over top of the function, i get a single line of Description that looks like this…