The code was moved to abilities.cpp so that it can be called from the units or attack_type functions, the attack_type function state necessary for the tags [filter_special_active] and [remove_specials] which I plan to implement when the code for filter_ability] is validated in its final form.
This allows permanently hiding the obnoxious help text tooltip that
constantly dances between the top and bottom of the screen depending
on what you're doing in the editor.
Icons provided by babaissarkar.
It's honestly not entirely clear what the right behavior is here. The way it is, to_bool is implicitly being invoked, which, given that this is supposed to hold an int, would always return false. And checking the int value doesn't seem to make sense either, since that would only exclude turns=0 (which would be a dumb value, but I'm not sure that's what this is for. So I figured a 'has attribute' check is best.
This avoids issues when building with Clang in C++20 mode. It seems in C++20 (possibly as a
result of vector gaining constexpr functionality), the rule about not referencing incomplete
types in a vector is now more strictly enforced.
See also https://www.lukas-barth.net/blog/cpp20-vector-incomplete/
* New "Apply" button in preferences dialog that is used to quickly apply the GUI2 theme, no restart needed.
* gui initialization reorganized a bit. gui2::init() now responsible for reading themes from file only. Actual theme switching and activation done by gui2::switch_theme(). preferences dependency removed from gui and moved to caller of gui2::init(). gui2 tests updated accordingly.
Opens load map/save map as dialogs in the addon's map directory if an addon is selected.
With no addon selected they open in the editor/maps directory.
* make drop caps utf8 aware and use locale's script font
1. Uses utf8::insert to modify the string so that it works for non-ASCII characters.
2. Use the locale's script font from data/hardwired/fonts.cfg instead of using Oldania always.
* make the algorithm work for multiple start tags in the tip text
* update condition to prevent throwing exception and don't use utf8::size
* adds comment that the tags do not have multibyte characters