hi there, I have a quick question about UI elements. I am at that stage of the game (2d tower defense) that I am experimenting with panels and more and also trying to draw those in aseprite. How do you usually go into making the UI elements? For example I want to have a bar at the top od the screen and in the middle I want to have a circle for where the wave numbers would go and maybe turn it into a button for start wave. So how would I create the bar at the top? Should I make one big panel from end to finish or should I create 2 small ones and the circle in the middle? Or should I create it first in aseprite like a big bar from side to side and just load the panels like that?Should we usually split the UI elements like that
I suggest you to look into this article and all of its linked subpages, hopefully this will spark some ideas on how to create UI in Godot.
In your example, you can probably do a simple setup like that, with just a Button, TextureRect and a Label. Most of the visual (the pink color, borders, margins, etc.) come from the panel property in the theme of the Button, the TextureRect is just an image of a circle with transparent background centered on the button, and the Label is the number 20. This whole thing works as a button, so you can hook up your logic to it if you want.
Before you spend a lot of time in your drawing your own assets, learn the basics of UI first. In fact, you’re better off coding the entirety of your UI system using the godot theme as placeholder art so you know exactly what you want to change (and how to do it). For example, a lot of textures on buttons and boxes have several re-sizing options that require a specific format to work smoothly, but save you loads of time drawing when you do get the format right.