
This implements an add-on extraction progress dialog that does not actually run its own event loop, allowing the caller to take ownership of it (display() static method) and update its state using a callback function object. The object in question is passed into the add-ons management API and used to update the dialog status each time an add-on file is written to disk as part of the pack extraction process. In order to avoid stalling the extraction process in UI code, the callback is invoked for every single file, but the dialog's progress update method places a time restriction on GUI2 API calls of 120 milliseconds -- this is a good throttle interval that allows add-ons to be extracted in about the same amount of time as before while still updating the progress bar smoothly enough for add-ons that take longer than that. (This is not the most trivial code to test, so it is suggested to add a sleep/delay API call in unarchive_file() in src/addon/manager.cpp to introduce artificial delays.) One issue with this code, however, is that because modeless_dialog doesn't execute its own event loop, the only way to get the dialog to be updated is to force a draw event in ourselves via the new gui2::dialogs::modeless_dialog::force_redraw() method. This is really a side-effect of my design choice here to run the dialog in the middle of a blocking operation instead of somewhere where events are being processed normally. I'm not entirely sure if the draw events would be pushed even in that case, however. Closes #1101.
Branch | CI status |
---|---|
Master | |
1.16 |
About
The Battle for Wesnoth is an Open Source, turn-based tactical strategy game with a high fantasy theme, featuring both singleplayer and online/hotseat multiplayer combat. Fight a desperate battle to reclaim the throne of Wesnoth, or take hand in any number of other adventures.
Community
The official Battle for Wesnoth Forums: https://forums.wesnoth.org/
Discord: https://discord.gg/battleforwesnoth
IRC: https://wiki.wesnoth.org/Support#IRC
Twitter: https://twitter.com/Wesnoth
Steam forums: https://steamcommunity.com/app/599390/discussions/
Installing
Wesnoth can be played on Windows, macOS, and Linux, and can be installed using:
- Steam (all)
- itch.io (Windows and macOS)
- The macOS App Store
- standalone installers on SourceForge (Windows and macOS)
- Flatpak (Linux)
Additionally, Wesnoth is available for iOS and Android.
To build the game from source, see INSTALL for instructions.
Contributing
Wesnoth is most in need of skilled C++ developers (C++14 and later), however there are things that nearly anyone can help with from simpler tasks in C++, the Lua and WML used for content scripting, Python used by various external tools, and even things like play testing and giving feedback on updated campaigns. Additionally, Wesnoth lacks art for a variety of unit animations - anyone who would be interested in lending a hand updating existing unit sprites or creating animations should take a look at the Art Forum as well as contact our current art director.
See also: CONTRIBUTING
For any questions, the best place to start is to simply join Wesnoth's forums, Discord, or IRC and start asking!
Donations
Donations can be sent via Liberapay as well as when downloading through itch.io. All money donated is used to pay for project expenses such as server rent and art commissions, and is very much appreciated.
License
All source code is licensed under the GNU GPL v2+. Most art and music is also licensed under the GNU GPL v2+, however new contributions are now licensed under the Creative Commons BY-SA v4.0. For more detailed information on Wesnoth's licensing, see the wiki:
https://wiki.wesnoth.org/Wesnoth:Copyrights
More Information
For extensive documentation about all aspects of the game, see the official Battle for Wesnoth web site:
https://www.wesnoth.org/ https://wiki.wesnoth.org/
A (translated) description of how to play the game can be found in doc/manual/manual.*.html, or online at:
https://wiki.wesnoth.org/WesnothManual
For information on creating your own maps, scenarios, and other content, see: