Opened 8 years ago
Last modified 2 years ago
#4097 new defect
Not enough space for resources in summary screen
Reported by: | echotangoecho | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | UI – Miscellaneous | Keywords: | |
Cc: | Patch: |
Description (last modified by )
Attachments (1)
Change History (8)
by , 8 years ago
Attachment: | screenshot0001.png added |
---|
comment:1 by , 8 years ago
Keywords: | simple added |
---|
comment:2 by , 5 years ago
Component: | UI & Simulation → Misc. UI |
---|
Move tickets to Misc. UI
as "UI & Simulation" got some sub components.
comment:4 by , 3 years ago
Keywords: | simple removed |
---|---|
severity: | → simple |
comment:5 by , 3 years ago
Keywords: | simple added |
---|
comment:6 by , 3 years ago
Description: | modified (diff) |
---|---|
Keywords: | simple removed |
Milestone: | Backlog → Alpha 26 |
It would be easy if only the summary numbers would need to be adjusted. One could simply use the abbreviateLargeNumbers
function from gui/common/tooltips.js
, but that would break the charts since the format is not supported via source/gui/ObjectTypes/CChart.cpp
.
CSize2D CChart::AddFormattedValue(const CStrW& format, const float value, const CStrW& font, const float buffer_zone) { // TODO: we need to catch cases with equal formatted values. CGUIString gui_str; if (format == L"DECIMAL2") { wchar_t buffer[64]; swprintf(buffer, 64, L"%.2f", value); gui_str.SetValue(buffer); } else if (format == L"INTEGER") { wchar_t buffer[64]; swprintf(buffer, 64, L"%d", std::lround(value)); gui_str.SetValue(buffer); } else if (format == L"DURATION_SHORT") { const int seconds = value; wchar_t buffer[64]; swprintf(buffer, 64, L"%d:%02d", seconds / 60, seconds % 60); gui_str.SetValue(buffer); } else if (format == L"PERCENTAGE") { wchar_t buffer[64]; swprintf(buffer, 64, L"%d%%", std::lround(value)); gui_str.SetValue(buffer); } else { LOGERROR("Unsupported chart format: " + format.EscapeToPrintableASCII()); return CSize2D(); } return AddText(gui_str, font, 0, buffer_zone).GetSize(); }
comment:7 by , 2 years ago
Milestone: | Alpha 26 → Backlog |
---|
Note:
See TracTickets
for help on using tickets.
As usual: 1024x768 is the smallest resolution that ought to be supported and while at it, ought to be tested against the "long-translations" mock language (which can be generated from
source/tools/i18n/generateLongStringTranslations.py
. can upload the language pack on request too).