Improve the widget hashing function: make it more unique and take a potential text item into consideration
Without that, we could not simply change the text item/label on a widget and force it to re-render automatically.
Ramblings about hobbyist game development
Improve the widget hashing function: make it more unique and take a potential text item into consideration
Without that, we could not simply change the text item/label on a widget and force it to re-render automatically.
– only make text textures as wide as necessary
– cache the bounding boxes for different font sizes instead of re-calculating every time
Makes things look less weird and quicker. Also, it becomes painfully apparent how weird it is to type “text textures”.
properly position and and draw text textures on widgets. more WiP.
It is rendered more readable now:
Add most of the new code to the widget and UI pipeline to actually show text labels on top of widgets. This is still very much WiP and to be seen as a proof of concept
The text is rendered in a broken way, we cannot yet show textures and text on the same widget, but it renders:
add more logic on the widget to place a text item (with an optional background). minor renaming of variables on the tile shader. temporarily add a very distinct background colour on the bottom bar main buttons
This brings us even closer to properly render text on widgets: amongst other things it is properly generating the ModelData structure for widgets with text rendering in mind.
add the possiblity to add text labels to the widget class
This is fleshing out the text-on-widgets support started in the previous commit.
Also, this is technically already used for the game mode buttons, but not quite working yet.
add members, getters and setters for text rendering to the widget class
Does exactly what it says! The UI widget base class gets a whole lot of extra boilerplate code, it is not used yet however.
Add fullscreen support
Yay!
end of current renderer refactor: move some more repetetive code into functions
See the last few commits, while still pretty big, the renderer become a lot more readable.
Further renderer refactoring: another 80 lines down
Not get a good day to be redundant renderer code.