Two changes in the theme config for 1024x600, which is inherited by the config
for 800x600. Both are the same line but otherwise only loosely related to each
other; together these fix issue #6264, which was that trigger areas for some
tooltips overlapped.
Reduce the width for the unit's name, thus giving the side-flag and side-number
(which get the remaining horizontal space) enough space to display themselves.
128 pixels wide is the same as the name gets in larger themes, even though
those larger themes use larger font sizes. This means that the side number
doesn't get ellipsed, at least for games with up to 9 sides, with the
side-effect that the tooltip can be displayed when hovering over the flag.
Move the name, and thus the flag and side-number down by 1 pixel, so that they
don't overlap with the tooltip trigger areas for movement points and terrain
defense. The name's location is based on the placement of `unit-box-botleft`;
the theme for larger screen-sizes similarly adds 5 pixels of padding because
the `unit-box` is only 72x72 for the image, and the text areas for movement
points and defense go lower than that.
(cherry picked from commit 0d4854d5ff)
- The t_string type is now a schema built-in type and no longer attempts a regex match.
- You can also specify that non-t_string types may be optionally-translatable; this case supports a regex match on the string (but note that the translation mark is not part of the match).
- Error messages involving keys with very large values ( > 128 characters) will now truncate the value.
- To account for occasional cases where the schema is intentionally violated, the --validate command-line option now automatically defines the SCHEMA_VALIDATION preprocessor define.
A key validates as type t_string if one of the following is true:
- The key is not present
- The key has at least one segment with a translation mark
- The key is blank (an empty string)
Any type other than t_string is not allowed to be translatable by default, unless you specify allow_translatable=yes in the [type] tag.
An optionally-translatable string could also be defined as a union of t_string and some other type.
This fixes the countdown report (a.k.a. clock) using the wrong font size
at small resolutions, as well as taking over the battery report's box
without resizing it and thus running out of horizontal room most of the
time.
This also removes two broken references to "timeout-panel" and
"report_timeout", neither of which being names that actually exist in
this version of the theme.
Supersedes 9e0593d714, which attempted to
fix the issue with the icon displaying at unexpected places by anchoring
it to the battery display from the left instead of staying true to the
intended design.
CC #5575
This makes it so the unit vision label uses a smaller font on smaller
resolutions. It also makes it so it doesn't take space away from the XP
report for all resolutions. Meanwhile, the XP report has more space.
CC #5575
This fixes the "def" label (previously unknown to everybody before the
sdl_ttf_compat API transition!) having the wrong box size and alignment.
This also extends to its accompanying unit defense report, which had the
wrong font size entirely.
This changes the position of Statistics, Status Table and Unit List
according to their respective likelihood of being used and relabels the
Back to submenu to Load Turn and brings it right under Load Game.
When [unit_status] shows two or more images, only the first showed and
there was no indication that there were further statuses. Now an
ellipsis is shown and the tooltip contains the information about the
second and further statuses.
Fixes#3197
The strategy is two-fold. We move the rendering of the icon into the
battery status report where it can be disabled at runtime, and allow the
countdown/clock to move to the position of the battery status if the device
doesn't have a battery. I also moved rendering of the clock icon to the
time report to allow the icon to move together with the text.
I needed to change theme::status_ to store pointers to status items because
otherwise the countdown object loses its type when inserted to the map. And
to be able to use std::unique_ptr inside the theme class, I had to make the
class non-copyable and movable.
Closes#3543. Fixups #3441.
The observers icon is declared immediately after `report_timeout`,
therefore the timeout widget was the ref rect for the observers widget:
83ba09a5a9/src/theme.cpp (L120)
PR #3441 added a battery icon to the left of the timeout widget. That
shifted the timeout widget to the right and the observers widget shifted
along with it due to its relative positioning. The observers widget
moved even on devices that didn't have a battery.
Fix this by using the battery box as the ref of the observers widget,
because it currently occupies the absolute location the observers widget
was positioned relatively to.
(cherry picked from commit 461cd2c4bd)
English uses 2 letter abbrev but some languages like Czech don't have this abbrev so we need wider space for our 6 letter label "Životů"
(cherry picked from commit d51ccbe538)
This slider hasn't worked in ages, and we're planning to remove it anyway.
The slider "groove" image remains since it's hard drawn in the background image file.
Since GUI1 widgets seem to rely on the given font size values in font.hpp
for their dimensions, those are unchanged. ThemeWML-provided sizes were adjusted,
and larger sizes assigned to elements that were too small with the new font.
Theme element rects were also adjusted as necessary.