Commit graph

270 commits

Author SHA1 Message Date
Toom
cac16cbdf1
add tooltip to [unit_vision] (#9191)
closes #7636
re #6021
re #5575
2024-08-18 17:00:06 -05:00
Marcus Örnås
d3b3c8c07a Add a "Teleport Unit (Debug!)" option to debug menu
Fixes #5649
2024-04-18 18:24:56 -05:00
doofus-01
450ab7959b minor cleanup of theme font macro 2024-03-10 14:07:13 -04:00
AugustVesterbacka
3127629f59
Mousing over a village shows the owner side in the UI (#7920)
Added village owner flag and side icon to terrain info field
2023-10-15 14:51:48 +02:00
gfgtdf
bf63ff3e9b seperate menu for quick replays 2023-06-03 15:56:01 +02:00
Celtic Minstrel
3c4c1c27f8 Add achievements to the in-game menu 2023-04-29 18:14:19 -04:00
Steve Cotton
80ce5e2a23 Delete an out-of-date comment in data/themes/default.cfg
The level isn't to the right of the alignment any more, the
workaround that the comment refers was removed in ca2eec45b9.
2023-02-08 09:01:52 +01:00
Tommy
90224728c1 Fix "def" label width in default theme
Fixes #6872
2022-07-15 13:38:51 +12:00
Tommy
8380e018f5 Fix low-res themes during replay.
This was mentioned as a comment in #5620.
2022-06-17 03:02:38 +12:00
Tommy
91fd53ac45 Fix "End Turn" button placement on low-res themes.
Fixes #6544.

I am not sure how this was even remotely working as it was.
2022-06-17 02:04:42 +12:00
Steve Cotton
b8400b5b72 ui: Fix 800x600 theme's sidebar tooltips
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)
2021-11-24 00:38:49 +01:00
Celtic Minstrel
0c42cdc038
Enable translation mark validation by the schema (#5800)
- 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.
2021-06-14 23:59:52 -04:00
Iris Morelle
e7d1a5dc8a ui: Handle the battery/countdown report switcheroo differently
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.
2021-03-18 20:27:57 -03:00
Iris Morelle
2c540ccfce ui: Anchor the Observers icon to the sidebar, going right to left
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
2021-03-18 20:27:57 -03:00
Iris Morelle
0d3517e7aa ui: Fix bad x position for the theme UI battery status on low resolutions 2021-03-17 23:40:29 -03:00
Iris Morelle
7713437085 ui: Reduce font size for the ToD counter
*Should* generally fix counters like 14/15 getting ellipsized. There was
no real reason for it to be so large to begin with.
2021-03-17 20:20:56 -03:00
Iris Morelle
ffbc7ebc57 ui: Rearrange and resize the unit vision and XP labels slightly
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
2021-03-17 19:43:47 -03:00
Iris Morelle
579610498a ui: Reduce unit HP/XP/MP/Def font sizes and line heights on 1024x600
Fixes the unit name overlapping the MP and defense reports.

CC #5575
2021-03-17 04:34:24 -03:00
Iris Morelle
97ece89aeb ui: Fix font and box sizes for unit defense labels on the sidebar
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.
2021-03-17 04:21:43 -03:00
Iris Morelle
c611128112 ui: Rearrange Menu menu items more logically
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.
2021-03-14 20:16:13 -03:00
Glen Whitney
2e6a043c1a Fix issue #4909. 2020-05-22 13:33:18 -05:00
Charles Dang
baec45fc53 Fixed turn display at ridiculously tiny res
[ci skip]
2019-10-18 15:30:21 +11:00
Charles Dang
cb35e6885f Ensure enough space to display turn numbers in the hundreds
[ci skip]
2019-10-18 15:30:18 +11:00
Wedge009
798bae668c Add zoom options to context menu.
Resolves #1213

(Alternatively could go in main menu (from the top-bar) but I feel it's crowded enough already (unless we have nested menus available).)
2019-10-16 15:27:49 +11:00
josteph
b4e977555b themes: Remove the brief top bar tooltips
These are the tooltips of the images. Mousing over the figures next to
the images shows a more verbose tooltip.

For #1068/#1060
2019-09-14 12:44:24 +00:00
Wedge009
e2c20e5563 Restore defence modifier display in side-bar
Fixes #3693, based on 47bd5ade.

[ci skip]
2019-09-07 22:50:02 +10:00
Steve Cotton
862e482895 Add a hint about not save-loading, and link to it from the "Back to ..." menu 2019-08-03 20:05:27 +02:00
jostephd
40fbb6dc43
Merge pull request #3731 from jostephd/sidebar-changes
Several sidebar changes
2019-01-07 21:05:39 +00:00
Jyrki Vesterinen
e9a6b95fd8 Better implementation of placing the clock (resolves #3582) 2018-11-18 19:52:24 +02:00
josteph
78523be7f7 Default theme: Make alignment and abilities wider. 2018-11-18 12:19:50 +00:00
josteph
815ded47dd Themes: Fix unit status icons not showing
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
2018-11-13 22:16:07 +00:00
Jyrki Vesterinen
34d93d44ca Hide battery status if the device doesn't have a battery
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.
2018-10-30 07:46:50 +02:00
Martin Hrubý (hrubymar10)
de183eeb2d Include battery percentage into GUI and add 2 versions of battery icon 2018-10-30 07:14:42 +02:00
josteph
9e0593d714 Themes: Fix the observers icon being hidden under the minimap
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)
2018-10-28 02:53:10 +00:00
Martin Hrubý (hrubymar10)
c79ba9ac03 Fix MP label for #2855
(cherry picked from commit 4ba1811f03)
2018-10-28 02:52:59 +00:00
Sofartin
0bc9f4ef23 Fix HP label in longer languages
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)
2018-10-28 02:52:54 +00:00
Martin Hrubý (hrubymar10)
674fda85b7 Migrate links to https if available - Fwd c18537edc0
(cherry-picked from commit bc4d22dc72)
2018-10-07 03:23:36 +00:00
Choicerer
12c7a950d2 Fixes broken tooltips for the unit_side flag and the unit name. (#3315)
Fixes #3306

(cherry-picked from commit f50b644c30)
2018-10-07 03:23:11 +00:00
kallaballa
78dff47bd3 Implemented dropout to observer on surrender 2018-02-05 00:35:35 +01:00
Celtic Minstrel
a1c22e5098 Rearrange default theme context menu to put most important commands at the top 2017-04-21 19:18:01 -04:00
Charles Dang
c912f7e7e7 Removed zoom slider code
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.
2017-03-07 21:05:25 +11:00
Celtic Minstrel
86675c28de Remove 800x480 support from the themes
[ci skip]
2016-12-02 16:05:32 -05:00
Charles Dang
1dafd22365 Further text clipping fixes (bug #24707) 2016-07-29 05:21:38 +11:00
Charles Dang
772f78b5a0 Fixed some ext clipping with Lato in sidebar (bug #24707) 2016-07-29 00:22:50 +11:00
Charles Dang
7a859a2ece Fixup a5130a4c36 (forgot to include small resolution buttons) 2016-07-24 10:00:01 +11:00
Charles Dang
a5130a4c36 Made sure menu button are flush with window border 2016-07-24 09:56:12 +11:00
Charles Dang
a3e535300b Revert "Don't show any images for buttons in menu bar"
This reverts commit a4c4f18a7c.
2016-07-23 15:27:15 +11:00
Charles Dang
b882a82ca4 Fixed placement of Observer icon 2016-05-28 00:41:33 +11:00
Charles Dang
52cba5fc63 Enabled Lato for GUI1 and adjusted assigned sizes accordingly
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.
2016-05-18 08:05:02 +11:00
Ignacio R. Morelle
00975dcf6f Fix ToD schedule progress label overlapping other items on low resolutions
Specifically, on vertical resolutions < 600 px.
2016-05-17 06:01:38 -04:00