Commit 87143d09

Add the first semi-working version of the status bar

For the time being this is the most complex widget, the StatusBar.
Next to a text label, one can also set a percentage value, the eponymous status, that it will translate into renderable model data that looks like, well, a status bar.
To make the distinctions between the different widget types work, they can now all return their type, thanks to the introduction of a new WidgetType enum class.
In order to showcase this in action the new status bars are being shown when a ControllableObject is selected, showing the values of health and hunger.
Furthermore, a bit of preliminary game logic is added in order to decrease an object’s food value when it moves. Check out the result:

Leave a Reply

Your email address will not be published. Required fields are marked *