Closed Triazic closed 4 years ago
Note: I recommend using v3 of the GUI for any new projects. It tides up a lot of v2's messy code and makes things like event handlers much easier to manage.
As for your question, you would have to override the Label's draw
method to draw a dot and then bump any text over.
Depending on what you're doing with the dots, you could make the grid out of a series of Checklist or Radio elements, then override their various input methods with either a noop (function() end
) to prevent the user from doing anything with them. If you have some specific interaction you do want for them, maybe put a frame on top with the background color set to "none" to hide it, then put your event handlers on that.
Lua's handling of Unicode is a bit iffy, but you can try using the Unicode bullet character: • (U+2022). I'm pretty sure I've used things like the checkmark character somewhere and it worked at the time.
I'm building a UI that requires a grid of dots. I can kinda achieve this by create labels with periods (".") as the caption, but that's a bit shit.
Is it possible to render just a primitive object like a circle, rectangle, line etc? These do not need to be interactable. I would handle everything using just mouse co-ordinates.