Update members of FontStyle

This commit is contained in:
Gymnasiast committed 2025-11-03 23:25:30 +01:00
1 parent 124352c922
commit 0ec4e3353b
52 files changed
+140 -140

No files matched your search

+4 -4
View File
@@ -72,7 +72,7 @@ namespace OpenRCT2::Ui::Windows
WindowDrawWidgets(*this, rt);
auto screenCoords = windowPos + ScreenCoordsXY{ (width + 1) / 2 - 1, kPadding - 1 };
DrawStringCentredRaw(rt, screenCoords, _numLines, _text.data(), FontStyle::Medium);
DrawStringCentredRaw(rt, screenCoords, _numLines, _text.data(), FontStyle::medium);
}
void onPeriodicUpdate() override
@@ -126,13 +126,13 @@ namespace OpenRCT2::Ui::Windows
windowMgr->CloseByClass(WindowClass::error);
// How wide is the error string?
int32_t width = GfxGetStringWidthNewLined(buffer.data(), FontStyle::Medium);
int32_t width = GfxGetStringWidthNewLined(buffer.data(), FontStyle::medium);
width = std::clamp(width + 2 * kPadding, kMinWidth, kMaxWidth);
// How high is the error string?
int32_t numLines{};
GfxWrapString(buffer, width + 1, FontStyle::Medium, &buffer, &numLines);
int32_t height = (numLines + 1) * FontGetLineHeight(FontStyle::Medium) + (2 * kPadding);
GfxWrapString(buffer, width + 1, FontStyle::medium, &buffer, &numLines);
int32_t height = (numLines + 1) * FontGetLineHeight(FontStyle::medium) + (2 * kPadding);
// Position error message around the cursor
const CursorState* state = ContextGetCursorState();