Hopefully making the whole faction more interesting and enjoyable to play.
Co-authored-by: Steve Cotton <steve@octalot.co.uk>
Co-authored-by: nemaara <nemaara@users.noreply.github.com>
For non-Windows platforms this adds:
* a new check for whether the logs directory exists and is writable by attempting to write a single whitespace to a dummy.log file.
* a popup shown immediately after the GUI system is initialized letting the player know if there was an issue creating the log file.
For Windows, this changes:
* instead of writing to the OS temp directory and then attempting to move that file to the logs directory, this uses the same check that was described above for non-Windows platforms.
* the alert shown when writing the dummy log file fails is now a Wesnoth alert message rather than the Windows-specific MessageBox.
* a failure to create a log file does not immediately exit wesnoth anymore.
Additionally, this makes it so that for the default state (logging to file), all platforms follow the same code path by calling `lg::set_log_to_file()`. `log_windows` now contains only the Windows-specific logic needed for handling the creation/redirection of output to a console.
If the northmost hexes of the map are visible, put the text on the bottom; if
the southmost are visible, put it on the top. Also, make the text smaller if
it's very wide.
It used to be fixed to the bottom of the screen, but this meant that it always
obscured the southmost hexes of the map, and the only way to avoid that is to
scroll east/west, or to add an extra row on the south. Similarly, having it at
the very top obscures the northmost hexes.
Moving it to any fixed location that isn't the edge of the screen makes it
possible to edit all the hexes, but also makes it more annoying when working
elsewhere on the map; that trade-off was rejected in review.
For very small maps, it will be at the bottom of the screen in the border
outside the map area. For any screen resolution there will be a specific
map-height that still has the old issue, but that's an improvement on it
happening for every map size.
Cherry-pick of 29d86d2c369483c45aa599076eb076c5792b7ef3.
No behavior changes, this is just separating it into the editor directory.
This corresponds to 1.16's 76306d3fb61da9a046087fc862d960a6ac5d4cad, but has
additional cleanup outside the editor directory, including removing the unused
code from floating_label.cpp. Even within the editor, there are differences
because of the graphics refactor.
A unit with no advancements has the XP bars hidden.
Other behavior of a unit with no advancements is unit-tested in
ec8ad5f26f06dc3219ccc5c44eb24edde0386dc6's "unit_no_advancements".
Most of these should be fine, but some need verification for
correctness using the new effect. Some of the color_adjust values
were very specific and i am not sure they give the same result now.
Several effects could probably also be significantly improved using
the new screen_fade system, with a little work.
Remove some unnecessary includes of wml_exception.hpp.
The last callers of these functions were removed in f545fbcbe8 and 4437691bdd,
and any potential future callers can use config::get_old_attribute instead.
Removes some translatable strings.
Remove some dead GUI1 code, leaving the editor's palettes as the only
code that calls font::set_help_string. This function shows a tooltip-like
text at the bottom of the editor's screen, for example when the paint tool
is active it shows which terrains are assigned to the left and right mouse
buttons.
There is similar functionality in GUI2, for example when hovering over the
title screen's buttons, which is handled via event::MESSAGE_SHOW_TOOLTIP.
This cleanup is the groundwork for moving the label in the map editor so that
it doesn't always obscure the southmost hexes of the map. The implementation of
font::set_help_string() has moved during 1.17's refactoring (from CVideo
in 1.16 to floating_label in 1.17.12); the intention is to replace it with
editor-specific code in a later PR.
Checking that the code is dead
---
Nothing called widget::set_help_string, therefore the rest of the removed code
in the widget class was effectively dead.
For the menu class, nothing set item::help. I doubt it was ever used; it was
added in a commit titled "changes to wose stats" that presumably accidentally
captured some work-in-progess C++ changes too: e2597cbc83.
The menu class is now only used by the help browser. The complete set of .cpp
files that get recompiled after changing menu.hpp are:
* help/help.cpp
* help/help_browser.cpp
* help/help_menu.cpp
* video.cpp
* widgets/menu.cpp
* widgets/menu_style.cpp
Since a0ee38a49, the inner this_item was still in scope when the inner loop
writes changed data back to the outer loop's variable, which meant that
changes were silently ignored.
A lot of the changes in wml-flow.lua are just indentation because of the
extra block.
Ensures that files either use tabs for indentation or spaces for indentation,
but don't switch between the two within the same file.
This doesn't fix the whitespace, it's a simple check to flag it up
on the assumption that it's better to use an editor or code formatter
to clean up the file.
Elsewhere in the CI we use the luacheck tool - while that can detect
mixing tabs and spaces in a single line's indent, it doesn't check for
inconsistent indentation within a file.