This unifies both the Version and the Language menu labels into a
single method for both that is called both during construction and
after switching languages. Both have this issue where they aren't
t_string instances, so changing languages has no effect on them for
that reason and they need to be manually re-translated.
Instead of SDL_WINDOWEVENT_RESIZED.
The documentation is a bit unclear, but SDL_WINDOWEVENT_RESIZED seems
not to trigger under certain circumstances, specifically when changing
resolution via SDL_SetWindowSize(); SDL_WINDOWEVENT_SIZE_CHANGED
meanwhile is implied to trigger any time the window size changes
whether it's from an API call, or the operating system, or a user
action.
<https://wiki.libsdl.org/SDL2/SDL_WindowEventID>
We need to translate at least one of these events into a GUI2 event in
order for dialogs to be properly re-laid out after the window size
changes, but we should not handle both because that could result in
unnecessary work recalculating all dialog layouts.
Closes#7436.
This adds support for having up to 28 distinct sub-achievements within a single achievement. This limit exists since wesnoth's layout isn't smart enough to tell a horizontal listbox to actually use its scrollbar instead of forcing a horizontal scrollbar on the whole window.
Additionally this adds the [set_sub_achievement] and [has_sub_achievement] WML tags and their respective lua functions. [has_sub_achievement] is unsafe for use in MP, for the same reasons that [has_achievement] is.
* wmlxgettext: Improve parser resiliency for malformed files
- WML files with no translatable strings will no longer
crash the script on unbalanced tags (but translatable will).
- .cfg files belonging to man(1) will no longer crash the script.
* Remove stray quotes from textdomain declarations
These are not recognized by the wmlxgettext parser.
This removes --wconsole, --wnoconsole, and --wnoredirect. Instead these are now handled by --no-log-to-file and --log-to-file.
If logging to file is enabled, then output will be written to the log file. If logging to file is not enabled, then output is written to the terminal. On Windows, a terminal will be created for the output to be written to if wesnoth is not launched from a terminal.
This version doesn't rely on custom parsing of the version number from
the (notably *not meant to be parsed*) operatingSystemVersionString
property, and explicitly appends the version number components to the
reported string instead so we don't get weirdness like "Apple macOS
13.3.1 ((Build" from an operatingSystemVersionString value like
"Version 13.3.1 (a) (Build 22E772610a)" (found after the early May
2023 rapid response patch to Ventura).
Additionally, this replaces the clunky version comparison to decide
whether to use the macOS or OS X branding with the @available syntax.
<https://developer.apple.com/library/archive/releasenotes/AppKit/RN-AppKit/index.html>
(Under "Runtime Version Check")
gui_->show_everything() also depends on the blindfold
feature somehow, that's why the previous implementation
avoided using it and just disabled show_everything in
play_controllers constructor. However i now think
it's safe to use it here.
- We now don't show an error message in the log when no
[side]s are defined, (this broke the unit test).
- We avoid calling `gui_->set_playing_team` when no [side]s
are defined.
- skip_empty_sides now doesn't throw, previously the behaviour
was inconsistent when there were no non-null sides. (it didn't
throw when there were no sides at all)
- skip_empty_sides now returns two values instead of changing
the parameter. (this was mostly to make the implementation
easier)
Move the line that includes data/test/scenarios/manual_tests/ below the
line that includes data/test/macros/. This allows a manual test to use
the setup in COMMON_KEEP_A_B_C_D_UNIT_TEST, putting units in the right position
to test combat and leadership abilities.
Also improve comments in data/test/_main.cfg.
* wmlxgettext: Error out on unused #po, #po-override directives
* wmlxgettext: Ignore out of domain #po, #po-override comments
* wmlxgettext: Properly clear pending #po, #po-override on textdomain switch
* Fix misplaced #po comments in DiD, SoF, TSG, Editor
Some of these ugly relocations can be reverted in or after #7570.