Best Practice for Tooltips: draw_texture vs Sprite.new()

AdzAdz Posts: 1Member
in 2D

Hi All,

Curious as I'm a noob. If you have to draw various textures, numbers & rectangles simultaneously at different positions & different rotations. How would you go about it?

I was previously using a separate 2D node to draw all of my tooltips, including draw_rect, draw_texture & draw_string simultaneously using very big arrays....however, I am starting to think it would have been easier in the long run to create new scenes with sprites, instance them & position them, then queue_free when done.

I.e. Grid based game:
-> User clicks player attack -> poolvector2darray with all possible tiles in range, passes to draw_class -> draw_class draws yellow rectangles in each vector
-> User clicks tile in range -> poolvector2darray with all possible tiles in range, combines array with vector of mouse click, passes to draw_class -> draw_class draws yellow rectangles in each vector & shows damage string at mouse click

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file