mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 20:43:04 +01:00
* Fix #11570 - create gfx_draw_string_centered() overload I created the overload, updated all calls from the old function to the new and deleted the old one
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "../core/IStream.hpp"
|
||||
#include "../localisation/Language.h"
|
||||
#include "../localisation/StringIds.h"
|
||||
#include "../world/Location.hpp"
|
||||
#include "ObjectJsonHelpers.h"
|
||||
|
||||
#include <memory>
|
||||
@@ -50,9 +51,8 @@ void WaterObject::Unload()
|
||||
void WaterObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const
|
||||
{
|
||||
// Write (no image)
|
||||
int32_t x = width / 2;
|
||||
int32_t y = height / 2;
|
||||
gfx_draw_string_centred(dpi, STR_WINDOW_NO_IMAGE, x, y, COLOUR_BLACK, nullptr);
|
||||
auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 };
|
||||
gfx_draw_string_centred(dpi, STR_WINDOW_NO_IMAGE, screenCoords, COLOUR_BLACK, nullptr);
|
||||
}
|
||||
|
||||
void WaterObject::ReadJson([[maybe_unused]] IReadObjectContext* context, const json_t* root)
|
||||
|
||||
Reference in New Issue
Block a user