No current plans. I'm mulling around rebuilding the entire AutoUI - there are a few things that bother me having used it as much as I have, and that is one of the things I'd love to integrate.
ome6a1717
Creator of
Recent community posts
It depends - it's really good for things menus and tooltips. Interaction will still need to be coded manually, but I would imagine for an RTS, the built-in mouse handling would help immensely. For example; conceptually, not actual code:
// CREATE // ... after creating your ui container/etc. button = auto_button(button_sprite); container.add(button); // STEP if button.is_hovering() and mouse_button_clicked() -> // do thing
There are also signals and watchers where you can have something like a text element and connect it to a global or local variable, which will automatically update when the variable changes.
As far as how it interacts with non-UI game objects, the entire container and its children exists in a variable, so it can be as simple or complicated as you'd like it to be. Again, it really depends on what you're trying to do.
Happy to answer any specific questions you might have!
If you enable the set_scale code in the AutoUiImage script, does that do what you're asking for? I've done some minimal testing and it does work that way, but I'm unsure specifically what issue you're running into. You can also copy your code here and I can maybe help point you in the right direction.
That’s the intended behavior at the moment. The offset isn’t only a draw offset, it also offsets any hovering coordinates.
What I would maybe do in your case is put the label in a horizontal container, and handle the hovering callback on the container instead of the label (so the container should still have the same hit box)
I originally intended them to scale, but can't remember why I left it out. I'll take a look, but in the meantime what I would do is place the image and set it's visibility to false. Then you can just manually draw your
img = auto_image(<data>); img.set_visible(false); // NOTE: you might need to add space using container.add_space(sprite_get_height(sprite) * scale)) to push the other elements // DRAW EVENT draw_sprite_ext(sprite, frame, img.get_bbox_left(), img.get_bbox_top(), etc.)
I think my hesitating factor was whether or not scaled images should push the adjacent content...maybe I'll add this to the next update.




























