-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overlaping widgets #980
Comments
I think the better way is to create custom widget for card. |
For a little more context and a theoretical basis, thinking of a "widget" as its individual components (image, text, shapes, etc.) is probably not the right level of abstraction. A widget is a rectangular area that is allocated from the layout, but what exists inside that rectangle is up to the widget itself; it can render any shapes it wants inside that space. This is how, e.g., the |
Overlapping widgets is something I also miss from time to time, e.g. to put controls on top of a canvas that can also be interacted with. Right now the only way to have overlapping widgets is to use Some idea for solutions:
How does other immediate mode API:s handle this? |
Related: #1516 |
Hello,
I'm using egui for a game engine project for card roguelikes and I wanted to use egui for the cards as ui elements.
The problem is that no matter what I do, I can't put text inside an image. As I read on another issue, widgets are expected not to overlap inside a window.
Could it be possible to allow widgets to overlap each other if explicitly told to do so?
This could help do composed widgets like you do on HTML.
I've tried using Areas, Windows, and Layouts. I tried putting the widget with put and using rects. I tried changing the order of the Widgets.
I also tried creating two areas at the same place, but they don't move at the same time. Perhaps there's a way to link two areas so they move at the same time, but I couldn't figure it out.
I would like to put the text above and below, in front of the card.
If this is already possible, any help to achieve it will be appreciated.
Thanks for everyone's work on this project, it's an awesome library.
The text was updated successfully, but these errors were encountered: