Format required code.

This commit is contained in:
Harry-Hopkinson 2024-05-09 16:12:38 +00:00
parent 89fde291c4
commit c5687db2dd
2 changed files with 4 additions and 2 deletions

View File

@ -330,7 +330,8 @@ void DrawStringCentredRaw(
for (int32_t i = 0; i <= numLines; i++)
{
int32_t width = GfxGetStringWidth(text, fontStyle);
DrawText(dpi, screenCoords - ScreenCoordsXY{ width / 2, 0 }, { TEXT_COLOUR_254, fontStyle }, static_cast<const char*>(text));
DrawText(
dpi, screenCoords - ScreenCoordsXY{ width / 2, 0 }, { TEXT_COLOUR_254, fontStyle }, static_cast<const char*>(text));
const utf8* ch = text;
const utf8* nextCh = nullptr;

View File

@ -287,7 +287,8 @@ static int32_t ChatHistoryDrawString(DrawPixelInfo& dpi, const char* text, const
int32_t lineY = screenCoords.y;
for (int32_t line = 0; line <= numLines; ++line)
{
DrawText(dpi, { screenCoords.x, lineY - (numLines * lineHeight) }, { TEXT_COLOUR_254 }, static_cast<const char*>(bufferPtr));
DrawText(
dpi, { screenCoords.x, lineY - (numLines * lineHeight) }, { TEXT_COLOUR_254 }, static_cast<const char*>(bufferPtr));
bufferPtr = GetStringEnd(bufferPtr) + 1;
lineY += lineHeight;
}