Alas, yet another re-write. I imagine, like all others, less and less will actually be edited. Anyways, I am going to focus on the UI foundation first off. TBSes are UI heavy games, and in retrospect I realized how much time I spent interrupting game coding with UI building.
So, first off the unrealistic goal is to make a easy to use, fairly complete, fairly reusable UI setup. Right now I've got an easy to use in spots, mostly incomplete, fairly reusable UI so it's perhaps not as unrealistic as the random newb's goal. Still, I should know better.
Anyways, on the docket:
- Modify colors to act more like resources
Currently it's a pain to set colors of child controls to be that of parent controls (and keep them in synch).
[edit1: Sort of done. Generic manager and color class defined, pre-existing infrastructure changed to use new color class. Now to make a concrete manager to test against.]
- Modify fonts to act more like rectangles
Once again, it's a pain to update controls if/when the font changes.
- Make resolution changes handled more elegantly.
Essentially moving from explicit to relative coordinates.
[edit1: Mostly done. I once again need concrete managers to test]
- Add support for drag/drop, mouseover, stop hover, double click, and make mouse clicks more natural.
Most of these aren't supported, and perhaps not a big deal. The main problem is that scroll bars are weird when you can't drag the bar. Also, there's currently a large lack of interactivity in the UI, making buttons non-obvious and certain things like hover popup elimination very tedious.
- Add more modularity to the resource setup.
This should allow for skinning, and easier alternative resource sets for whatever reason (colorblindness, internationalization, hard of seeing).
- Create default resource aliases.
Which will centralize the UI defaults making them easier to see/change/replace/re-alias.
- Add more controls.
The biggie. Key on the list are layout objects, scrollbars that don't suck, buttons that interact better, hover popups, pre-made tabpages, perhaps a progress bar, and overall minor improvements to pre-existing controls. [edit: and many more I can't think of now
- Change TiedRect to allow arbitrary ties
The most common dynamic rectangle used should allow multiple ties to others stretching if necessary rather than placing awkward sizing functors for it.
[edit2: code added. Untested, existing source not yet changed to use the less demanding interface]
- Add info about aspect ratio somewhere
Because with relative coords, that will matter more than the resolution.
[edit1: done. Added enum, properties, event]
- Add a dirty flag to renderables.
To allow for more intelligent caching since the UI likely won't be very dynamic.
...and more as I think of it.]
[edit1: 2 hours work, much done.]
[edit2: 2 more hours, a bit done.]