Let's internally handle this mess in terms of tokens instead of
delimiter positions.
This alters the code so we don't add and substract ones (1) all over the
place. It also simplifies the final std::string_view::substr() call so
we don't need to count the remainder's length at all.
And more importantly, this makes the case where no delimiters had been
previously found trivial instead of causing it to break and result in no
text being output at all. We also don't start with a size_t value of -1
(actually a very large unsigned value).
Closes#5625.
This is the only widget in mainline using GUI2's [draw][circle] tag. I'm
currently working on a change to the C++ text_shape class, and want to
be able to regression-test the placement of [circle]s after that change.
I'd be okay with deprecating both [circle] and [round_rectangle] as neither
seems to be used elsewhere, but this close to feature-freeze I'd prefer to keep
them in 1.16 rather than suggest removing them now.
To see the widget, start the game with `wesnoth --clock`, and then click the
button underneath "Quit" on the main menu.
To report the WFL call stack in the event of errors, a static stack is used to
record that call-stack. This wasn't thread-safe, and it intermittently crashed
when the game config was movetype patching (the other WFL thread involved is
the GUI2 layout code).
Also a Rule of Three fix for the call_stack_manager class. While this wasn't
the cause of the crash, it could also have lead to a call_stack.pop_back() on
an empty stack.
The primary target of this change is hotkey labels in game menus. This
aligns them all to the right of the menu and increases the space between
them and the menu item label proper to attain a cleaner appearance.
The impact of increasing button sizes on the top bar and replay UI
is a bit worse than expected and I can't be bothered to deal with the
consequences at this time.
When a unit gives adjacent units abilities used like weapon specials, and is not already showing an animation from giving a resistance or leadership effect, a [teaching_anim] can be played instead.
First cause of breakage seems to be that the introduction of color_t
changed the size of the colour components from something longer than 8
bits to 8 bits, resulting in stringstream outputting invalid UTF-8. The
second cause is the dropping of GUI1 markup along with SDL_ttf.
This connects to issue #2710, although the main reasoning about it is in #5517.
The difficulty balance isn't the only problem with loading old saved games, but
it's a simple example to explain.
This warning is intended for the change between 1.14 and 1.16, but will be shown
to anyone loading 1.15.x saves into 1.15.y - that's something that they should
expect in a dev branch.
The impacted code path is only executed as part of the implementation of
the characters_per_line constraint.
According to the Pango documentation, PangoFontMetrics should be
released using pango_font_metrics_unref(), and PangoFont should be
released using *something* not specified. Existing code, and the
documentation for pango_fontset_get_font(), suggests the answer for the
latter is g_object_unref().
This is preparation for backporting 0ba433203e, with the idea that both sets
of names will be supported in both branches.
No deprecation messages are added. While config::get_attribute_value() has a
config::get_old_attribute_value(), there isn't currently a similar utility for
config::child(); maybe I should add one now, but it feels too large a change
for a backport.