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)
[ci skip]
These were half-baked and mostly badly-designed. The Unit Box theme was never finished, is completely broken,
and if we were to do a major theme refresh we'd probably go in another direction. The Widescreen theme was a
legacy experiment that was never adopted and as of now is basically alsp completely broken.
[ci skip]
Not really necessary, just took up space. Partly addressed #1844. As for the new [main_map] rect numbers, I
just played around with them until they filled the available space.
These were added with permission from shadowm, and were copied verbatim save for a small tweak to
the position of the menu button in the cutscene theme to get rid of the 3 pixel offset on the left
which had been corrected a few releases back in the default theme.
These were rendered unnecessary by 781276709d, which changed border rendering to use the terrain engine.
This also removes display::draw_border, which used the keys.
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.
This is similar to "Draw Hex Coordinates" and "Draw Terrain Codes", and displays the number of terrain graphics surfaces draw for each hex. It is useful for spotting mistakes such as overlay images having non-transparent pixels in adjacent hexes where they shouldn't, or for comparing the efficiency of different kinds of terrain graphics rules.
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.
More specifically, horizontal resolutions less than 1024 px.
Okay, I lied. This doesn't fully fix that on master because recent font
and theme changes cause it to be misaligned even on >= 1024 px. But
hopefully someone will figure something out later.
This is a backport of a 1.12 commit.
File paths are recorded into the game preferences up to a (currently
hardcoded) limit of 6 and opening or saving maps adds or bumps existing
entries to the top. We may allow users to change the MRU limit in
Advanced Preferences in a later commit.
Adds two translatable strings.
In order to fit file paths in the menu without filling up the whole
screen sideways, we use only the file names for now. Because identical
file names could prove to be an actual issue later, I intend to look
into ellipsizing paths correctly in a later step.
(Note that I'm piggybacking on the crummy submenu support we already had
in the themable UI so that this can be safely backported to 1.12. It's
decidedly not optimal usability-wise, but it'll have to do for now.)