Last week I continued my UI changes and DaniJ was improving support for Doom mapping hacks.
My main objective for the week was to revise the autoupdater's dialogs. To make this possible, I first needed to apply some enhancements in the new UI framework related to dialog-type widgets, general ease-of-use, and the layout mechanism.
One of the central components of the layout system is called RuleRectangle. It basically contains information about where an individual widget is placed on the screen. The tricky part is that one can define the placement of any widget in relation to other widgets (typically while also applying mathematical operations to the coordinates), and the system needs to very quickly resolve where everything ends up when drawing the next frame. I managed to rewrite this class entirely in a more efficient and robust manner.
Another change was to enhance the way a widget's margins are defined. This is the amount of empty space to leave between the widget's rectangle and its content (cf. padding in the CSS box model
). Unlike before, now every widget can have separate margin widths on each of its four sides, and the margin values are stored as Rules so they can be used freely in widget layout calculations.
The UI framework now supports dialog-type widgets as a specialization of popups. The dialog may appear as a standalone widget (centered in the view), or it may appear attached to some other UI element, like a regular popup.
These changes, plus a few more under the hood, allowed me to completely revamp the Updater's UI. First a screenshot of the new automatic update settings dialog:
The settings can be accessed from the DE menu or from the update check dialog.
Now when a download is in progress, its status is displayed in the notification area and one can access the download dialog simply by clicking the notification widget. All of this means there are no more forced switches to windowed mode or playing around with separate dialog windows.
I also improved the About dialog to be a bit more useful. You can now see the active GL and audio configuration by clicking on the respective buttons:
Finally, on Windows, the UI style was improved to use the Open Sans
font. This provides a fresher, more readable look for the UI.