mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 21:13:05 +01:00
Use dpi ref in rect and line drawing functions
This commit is contained in:
committed by
duncanspumpkin
parent
2941f6f7a5
commit
bb83a80eab
@@ -140,16 +140,16 @@ void ChatDraw(DrawPixelInfo& dpi, uint8_t chatBackgroundColor)
|
||||
GfxSetDirtyBlocks(
|
||||
{ topLeft - ScreenCoordsXY{ 0, 5 }, bottomRight + ScreenCoordsXY{ 0, 5 } }); // Background area + Textbox
|
||||
GfxFilterRect(
|
||||
&dpi, { topLeft - ScreenCoordsXY{ 0, 5 }, bottomRight + ScreenCoordsXY{ 0, 5 } },
|
||||
dpi, { topLeft - ScreenCoordsXY{ 0, 5 }, bottomRight + ScreenCoordsXY{ 0, 5 } },
|
||||
FilterPaletteID::Palette51); // Opaque grey background
|
||||
GfxFillRectInset(
|
||||
&dpi, { topLeft - ScreenCoordsXY{ 0, 5 }, bottomRight + ScreenCoordsXY{ 0, 5 } }, chatBackgroundColor,
|
||||
dpi, { topLeft - ScreenCoordsXY{ 0, 5 }, bottomRight + ScreenCoordsXY{ 0, 5 } }, chatBackgroundColor,
|
||||
INSET_RECT_FLAG_FILL_NONE);
|
||||
GfxFillRectInset(
|
||||
&dpi, { topLeft + ScreenCoordsXY{ 1, -4 }, bottomRight - ScreenCoordsXY{ 1, inputLineHeight + 6 } },
|
||||
dpi, { topLeft + ScreenCoordsXY{ 1, -4 }, bottomRight - ScreenCoordsXY{ 1, inputLineHeight + 6 } },
|
||||
chatBackgroundColor, INSET_RECT_FLAG_BORDER_INSET);
|
||||
GfxFillRectInset(
|
||||
&dpi, { bottomLeft + ScreenCoordsXY{ 1, -inputLineHeight - 5 }, bottomRight + ScreenCoordsXY{ -1, 4 } },
|
||||
dpi, { bottomLeft + ScreenCoordsXY{ 1, -inputLineHeight - 5 }, bottomRight + ScreenCoordsXY{ -1, 4 } },
|
||||
chatBackgroundColor,
|
||||
INSET_RECT_FLAG_BORDER_INSET); // Textbox
|
||||
}
|
||||
@@ -203,7 +203,7 @@ void ChatDraw(DrawPixelInfo& dpi, uint8_t chatBackgroundColor)
|
||||
int32_t caretX = screenCoords.x + GfxGetStringWidth(lineBuffer, FontStyle::Medium);
|
||||
int32_t caretY = screenCoords.y + 14;
|
||||
|
||||
GfxFillRect(&dpi, { { caretX, caretY }, { caretX + 6, caretY + 1 } }, PALETTE_INDEX_56);
|
||||
GfxFillRect(dpi, { { caretX, caretY }, { caretX + 6, caretY + 1 } }, PALETTE_INDEX_56);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user