1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Fix rebase errors

This commit is contained in:
Gymnasiast
2021-02-28 00:35:38 +01:00
parent 7fd049c22e
commit d6971fa79e

View File

@@ -179,9 +179,8 @@ namespace OpenRCT2::Scripting
DukValue measureText(const std::string& text)
{
gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM;
auto width = gfx_get_string_width(text);
auto height = string_get_height_raw(text.c_str());
auto width = gfx_get_string_width(text, FontSpriteBase::MEDIUM);
auto height = string_get_height_raw(text.c_str(), FontSpriteBase::MEDIUM);
return ToDuk<ScreenSize>(_ctx, { width, height });
}
@@ -258,8 +257,7 @@ namespace OpenRCT2::Scripting
void text(const std::string& text, int32_t x, int32_t y)
{
gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM;
gfx_draw_string(&_dpi, text.c_str(), _colour.value_or(0), { x, y });
gfx_draw_string(&_dpi, { x, y }, text.c_str(), { _colour.value_or(0) });
}
};
} // namespace OpenRCT2::Scripting