1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 16:24:35 +01:00

Improve readability of hover tooltip

Also removed reliance on the localisation table.
This commit is contained in:
Michael Bernardi
2024-08-02 05:31:22 +10:00
parent f4a1d22662
commit 82f658963f
3 changed files with 31 additions and 31 deletions

View File

@@ -222,7 +222,7 @@ static Widget _windowFinancesResearchWidgets[] =
static constexpr ScreenCoordsXY kGraphTopLeftPadding{ 88, 20 };
static constexpr ScreenCoordsXY kGraphBottomRightPadding{ 15, 18 };
static constexpr uint8_t kGraphNumYLabels = 5;
static constexpr int32_t kGraphNumPoints = 64; // todo. was always 64 in original code.
static constexpr int32_t kGraphNumPoints = 64;
#pragma endregion
@@ -244,7 +244,6 @@ static Widget _windowFinancesResearchWidgets[] =
SetPage(WINDOW_FINANCES_PAGE_SUMMARY);
_lastPaintedMonth = std::numeric_limits<uint32_t>::max();
ResearchUpdateUncompletedTypes();
_graphProps.lineCol = colours[2];
_graphProps.hoverIdx = -1;
}
@@ -363,6 +362,7 @@ static Widget _windowFinancesResearchWidgets[] =
_graphProps.RecalculateLayout(
{ _graphBounds.Point1 + kGraphTopLeftPadding, _graphBounds.Point2 - kGraphBottomRightPadding },
kGraphNumYLabels, kGraphNumPoints);
_graphProps.lineCol = colours[2];
}
break;
}
@@ -848,6 +848,12 @@ static Widget _windowFinancesResearchWidgets[] =
// Graph
GfxFillRectInset(dpi, _graphBounds, colours[1], INSET_RECT_F_30);
// hide resize widget on graph area
constexpr ScreenCoordsXY offset{ 1, 1 };
constexpr ScreenCoordsXY bigOffset{ 5, 5 };
GfxFillRectInset(
dpi, { _graphBounds.Point2 - bigOffset, _graphBounds.Point2 - offset }, colours[1],
INSET_RECT_FLAG_FILL_DONT_LIGHTEN | INSET_RECT_FLAG_BORDER_NONE);
// Calculate Y axis max and min.
// This is how the original code does it. Could be improved.