I'm making a UI system (mostly for fun and to learn), and I'm trying to figure out the right pattern for it.
I want to use it for games and editors. So I was thinking some type of immediate mode GUI since in game UIs, it doesn't make sense to have events when states change, and it is pretty high performance, especially when moving position of elements a lot. And simple.
Immediate mode pattern has a few issues though, there isn't really a good way to have an editor for building the UI visually. And if there was some type of editor, doing bindings would require boxing for each value (at least I can't think of another way without boxing). It is difficult for extensions to modify the UI.
For retained mode patterns, if you do something like MVVM it is heavily event driven, which isn't great for game UIs and has lots of boilerplate, also rather complex to make. But is quite easy to do a visual UI editor/builder for.
Retained mode GUI also generally are less performant when moving elements and such.
I looked at like a MVU pattern from Uno, but that seems to have a lot of the same issues as MVVM had, with performance and events.
I feel like there are other patterns, one that would fit well with what I want. But I'm having trouble even finding different patterns to look in to.
To summarize what I am looking for:
- High performance updates.
- Mostly not event driven.
- Easily modifiable from third-party.
- Buildable from an editor.
Any suggestions?