flesh out the container system and add add some non-dummy callbacks to the mode buttons
This introduces a concept of “dirtiness” to the widgets, if a widget is nor marked as dirty, no longer recalculate its hash value on every render cycle. The latter part of the commit message is a bit misleading, as it merely restructures the way the game mode is changed, not the fact that is changed.
add a click handler to the widgets and make our UI buttons actually trigger something
This makes it possible to actually set a callback for when a widget is clicked. The new buttons are put to good use and can now be used to set the game modes, instead of the user having press F1, F2 and F3 respectively, but the hotkeys for this were also left in place.
– implement basic state hash calculation in widgets – fix some size/position calculation bugs in code that was previously unused – add some dummy buttons
As it says on the label. The mechanic to check the state hash was already in place, the actual calculation however did nothing so far, it is still pretty basic however. This is also the first time buttons are drawn:
– convert the Dimension and Position2Raw types to proper classes, not just aliases – fix errors resulting from that – fix up smaller problems that have been hiding in the code – always draw the UI on top of everything else
We needs some custom logic in the Dimension/Position2Raw types, so they need to be proper classes themselves. This also adds the need for a fair amount of casts.