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

+6 -6
View File
@@ -319,7 +319,7 @@ namespace OpenRCT2::Ui::Windows
// Check how this date is represented (e.g. 2000-02-20, or 00/02/20)
std::string date = Platform::FormatShortDate(long_time);
maxDateWidth = GfxGetStringWidth(date.c_str(), FontStyle::Medium) + kDateTimeGap;
maxDateWidth = GfxGetStringWidth(date.c_str(), FontStyle::medium) + kDateTimeGap;
// Some locales do not use leading zeros for months and days, so let's try October, too.
tm.tm_mon = 10;
@@ -328,12 +328,12 @@ namespace OpenRCT2::Ui::Windows
// Again, check how this date is represented (e.g. 2000-10-20, or 00/10/20)
date = Platform::FormatShortDate(long_time);
maxDateWidth = std::max(maxDateWidth, GfxGetStringWidth(date.c_str(), FontStyle::Medium) + kDateTimeGap);
maxDateWidth = std::max(maxDateWidth, GfxGetStringWidth(date.c_str(), FontStyle::medium) + kDateTimeGap);
// Time appears to be universally represented with two digits for minutes, so 12:00 or 00:00 should be
// representable.
std::string time = Platform::FormatTime(long_time);
maxTimeWidth = GfxGetStringWidth(time.c_str(), FontStyle::Medium) + kDateTimeGap;
maxTimeWidth = GfxGetStringWidth(time.c_str(), FontStyle::medium) + kDateTimeGap;
}
void LoadPreview()
@@ -705,7 +705,7 @@ namespace OpenRCT2::Ui::Windows
// Get 'Save' button string width
auto saveLabel = LanguageGetString(STR_FILEBROWSER_SAVE_BUTTON);
auto saveLabelWidth = GfxGetStringWidth(saveLabel, FontStyle::Medium) + 12;
auto saveLabelWidth = GfxGetStringWidth(saveLabel, FontStyle::medium) + 12;
widgets[WIDX_SAVE].type = WidgetType::button;
widgets[WIDX_SAVE].top = height - paddingBottom - 15;
@@ -715,7 +715,7 @@ namespace OpenRCT2::Ui::Windows
// Get 'Filename:' string width
auto filenameLabel = LanguageGetString(STR_FILENAME_LABEL);
auto filenameLabelWidth = GfxGetStringWidth(filenameLabel, FontStyle::Medium);
auto filenameLabelWidth = GfxGetStringWidth(filenameLabel, FontStyle::medium);
widgets[WIDX_FILENAME_TEXTBOX].type = WidgetType::textBox;
widgets[WIDX_FILENAME_TEXTBOX].top = height - paddingBottom - 15;
@@ -740,7 +740,7 @@ namespace OpenRCT2::Ui::Windows
{
const auto& widget = widgets[WIDX_PARENT_FOLDER];
const auto pathWidth = widget.left - 8;
const auto shortPath = ShortenPath(_directory, pathWidth, FontStyle::Medium);
const auto shortPath = ShortenPath(_directory, pathWidth, FontStyle::medium);
// Format text
std::string buffer;