
Fixes #6724, where scrolling with the mousewheel could reach the last row, but scrolling with keys or buttons couldn't. Although can_scroll_up() and can_scroll_down() already existed, can_scroll_down() didn't allow access to the last line when that line had less than the full number of items. The mousewheel still worked, because it ignored that logic. Remove a feature that was seen when the last row is visible - things jumped between columns to fill the spaces. If you have 10 items, with 4 columns and 2 visible rows then it will appear like this: a b c d e f g h when scrolling down it used to move items sideways to fill the last line, which seems bad UI because it made items harder to find: c d e f g h i j the new code is simpler, and will instead show the following when scrolling down: e f g h i j Move the layout code into adjust_size(), so that it runs one time when the number of buttons changes. That could be separated from this commit, but the code would still be touched in this commit (`counter_from_zero` would still be replaced by `i`), so doing it and testing the changes together made sense. Note for the master branch only: scrolling the palettes up and down is noticeably laggy, which is a regression from last week. That's not caused by this commit, we're just at a point in the rendering refactor where `surface_restorer::update()` and thus `gui::widget::hide()` are slow. The fix for that is already in progress and going to be in 1.17.5.
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: