UIs Are Hard
If you're like me, you've thought to yourself at least once: "Hey, making a UI can't be that hard! I wouldn't need to add any more headers or libraries to my project!" Because not having to deal with C++ is a good reason to write your own UI.
Well, I did it for my game, Twin Gods. I can't remember why anymore beyond "hey, that sounds like fun". Am I glad I have it? Yes! You very much learn a lot about how a UI works. Would I do it again? Probably not.
What came out the other end is a confusing mixture of knowledge, a lot of head-bashing, years of code that went sideways more than once, and a working UI for a functioning game. Let's see how it works, shall we?
This is not an article to sell you on using my UI (*0). This is only intended as a showcase of how it works, why it works that way, what went into making it, and how difficult it is to make a UI from scratch. And I cannot understate how difficult it is -- and how much time it takes -- to make a UI from scratch.