Yet another report on GUI2
Despite Mordante/SkeletonCrew’s absence from the #wesnoth-dev
IRC channel for a while, I’ve still been making progress on converting more parts of the Wesnoth game interface to the GUI2 toolkit. As I mentioned before, completing the transition to GUI2 is an important step towards the next major milestone that is Wesnoth 2.0, and there’s still a lot of work to be done in this area.
Yesterday I pushed a set of commits that convert the Campaign Difficulty selection dialog to GUI2, as part of the changes for Wesnoth 1.9.3. Although It was rather simple to implement, I had to refactor out from the in-game character dialog ([message]
) window some code to parse the legacy GUI1 menu items markup, which is now possible to combine with Pango to achieve funky effects in the difficulty menu like what After the Storm already managed with GUI1, and more.
As a result, both the campaigns menu and the difficulty menu consistently use the same toolkit now and there’s even less remaining to be done to discontinue the usage of legacy widgets:
- The whole gamemap view and the surrounding UI still use GUI1 elements, as do context and main menus in the game.
- Every dialog with unit previews (debug-create, unit list, recruit, recall, load game, level-up) still needs to be converted to GUI2. There are experimental versions of the Load/save game and Debug-create dialogs in development since a while ago and they can be previewed with the
--new-widgets
command-line option. - The whole help system and the Credits screen accessible from the main menu still need to be converted.
- Story screens don’t use GUI2 yet but they do use Pango for rendering text on the title and body regions.
- The game preferences, hotkey configuration/input and network progress dialogs still use GUI1.
- The add-ons manager (install/update) dialog needs to be remade in GUI2 as soon as possible in order to address the many usability complaints found in the Ideas forum.
- The End-of-game and loading screens still use what I like to call “GUI0”, a widget-less presentation format that uses the legacy SDL_ttf-based text rendering code.
- The game status and statistics windows.
- The multiplayer game setup and waiting screens also need to be converted to GUI2, although an experimental/WIP version of the former is already available.
- Floating text labels in the game still need to be converted to use Pango instead of SDL_ttf.
Despite the possibly incomplete but long list above, we are much closer to having a consistent game UI that can be later updated and polished as necessary without the involvement of ugly and hard to maintain hacks. Eleazar and West already have some cool ideas which would be nice to implement in the near future.