forked from rosebudai/OpenRCT2-Web
fix drawing of object preview
We can't use dpi->width and dpi->height as they only define the clip region, not the viewport
This commit is contained in:
1 parent
81a597ab0d
commit
4bf9748143
27 files changed
+49
-49
No files matched your search
@@ -57,10 +57,10 @@ void WaterObject::Unload()
|
||||
_legacyType.string_idx = 0;
|
||||
}
|
||||
|
||||
void WaterObject::DrawPreview(rct_drawpixelinfo * dpi) const
|
||||
void WaterObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const
|
||||
{
|
||||
// Write (no image)
|
||||
int x = dpi->width / 2;
|
||||
int y = dpi->height / 2;
|
||||
sint32 x = width / 2;
|
||||
sint32 y = height / 2;
|
||||
gfx_draw_string_centred(dpi, 3326, x, y, 0, nullptr);
|
||||
}
|
||||
Reference in new issue
Block a user