Open EriKWDev opened 9 months ago
Seems like a really nice idea, defining panes right now is really a pain atm.
Out of interest to see if I could do it, I've been working on a macro that does pretty much what you asked (the syntax I decided on is slightly different, but otherwise does what you want). I'm done the macro and it works well, I'm just writing up documentation and some tests and then I'll send in a PR.
I really like this extension to egui! I've written several apps at my previous work using
egui_dock
, but I am now switching toegui_tiles
for my current company's game engine. Adding docking/tiles to egui really takes the gui to the next level.The thing that was not so nice about
egui_dock
was the way in which you defined the initial layout of all the tabs and panes in code. If I really put my head to it, I was able to get the layout I wanted, but after coming back to the code way later it was always a pain.Sadly, I felt the same now that I came back to my layout code for
egui_tiles
. I feel like there should be a way to describe the layout I want in a more expressive and editable way rather than a bunch of calls toset_share
and needing to have good names for panes/tiles/tabs and manually inserting them into the correct Container. Maybe it's just me, but not knowing the internals ofegui_tiles
there seem to be a lot of concepts to learn for the user.I usually don't advocate for crazy macros, but I feel like there could be a use for one here just to make the initial creation of the
Tree
really ergonomic. Perhaps this can even be done with plain functions - implementation detail.Here is my current layout:
And it would be lovely to be able to express it in a way like this:
rather than
Maybe I'm just using
egui_tiles
poorly though and there are some hidden gems here that I've not discovered to make the layout cleaner/readable xP