– 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.
fix model rendering. add texture id to the widget parameters
While adding an optional texture id to the widgets it does not do anything in terms of actually rendering it yet. It is also bringing up more of the rendering side of things, starting to account for the differences to the model manager, where we do not have concepts such as “models in models”, while “widgets in widgets” exist.
– further flesh out the widget interface (and implementation) – add a new (yet unused) UiPipeline to the renderer – add an automated id assignment to the widgets
This adds the render pipeline for the UI, it is mostly copied over from the model pipeline, since there is the biggest logical overlap. Also, the interface manager automatically counts up the number of instanciated widgets in order to assign them a unique id, similar to the models.
– add a concrete implementation for a simple container (that displays widgets in a rwo) (sic) – add the minimal implementation of the UI manager (that only adds the empty bottom bar so far)
The newly introduced RowContainer is just a small implementation of the abstract container class. It does not do much, but draw its child elements in a row. Apart from that the concept of “padding” was introduced, so that child elements have some spacing in-between them. To give everything a central place, the InterfaceManager was introduced, which itself implements the AbstractWidget class. Since it is a widget itself, its children can calculate their size relative to it. For instance the newly introduced “bottom bar”, which will house most of the upcoming UI can be defined as follows:
slight refactoring of the widget constructors to make them easier to instantiate. added more setters to the abstract widget, so that we can have fewer required ctor parameters
– add some bookkeeping to the abstract container – use a different way to write memeber variable comments (sic)
The book keeping in this case means calculating the absolute size of the children inside a container as well as recalculating it when adding/removing children.
– do more refactoring – add a first concrete implementation (a “button” that does nothing but draw its background colour) – change the interface (and implementation) of the abstract container class, use smart pointers instead of references so that we can actually use abstract classes
That basically says it all, that new button does not do much yet besides existing.