Skip to content

Commit

Permalink
Fix some deprecation warnings
Browse files Browse the repository at this point in the history
Namely:

 - [[deprecated("Use BlendTextOutline")]]
 - [[deprecated("Use BlendText")]]
 - [[deprecated("Use BlendImage")]]
 - [[deprecated("Use BlendImage")]]
 - [[deprecated("Use TextSize().X - 1 (yes this is very bad code eww)")]]
  • Loading branch information
LBPHacker committed Apr 29, 2023
1 parent 2960e0f commit f5cbc30
Show file tree
Hide file tree
Showing 35 changed files with 103 additions and 168 deletions.
2 changes: 1 addition & 1 deletion src/PowderToy.cpp
Expand Up @@ -440,7 +440,7 @@ int main(int argc, char * argv[])
engine.g->Clear();
engine.g->DrawRect(RectSized(engine.g->Size() / 2 - Vec2(100, 25), Vec2(200, 50)), 0xB4B4B4_rgb);
String loadingText = "Loading save...";
engine.g->BlendText(engine.g->Size() / 2 - Vec2(Graphics::textwidth(loadingText) / 2, 5), loadingText, style::Colour::InformationTitle);
engine.g->BlendText(engine.g->Size() / 2 - Vec2((Graphics::TextSize(loadingText).X - 1) / 2, 5), loadingText, style::Colour::InformationTitle);

blit(engine.g->Data());
try
Expand Down
4 changes: 2 additions & 2 deletions src/PowderToyRenderer.cpp
Expand Up @@ -61,9 +61,9 @@ int main(int argc, char *argv[])
}
else
{
int w = Graphics::textwidth("Save file invalid")+16, x = (XRES-w)/2, y = (YRES-24)/2;
int w = Graphics::TextSize("Save file invalid").X + 15, x = (XRES-w)/2, y = (YRES-24)/2;
ren->drawrect(x, y, w, 24, 192, 192, 192, 255);
ren->drawtext(x+8, y+8, "Save file invalid", 192, 192, 240, 255);
ren->BlendText({ x+8, y+8 }, "Save file invalid", RGBA<uint8_t>(192, 192, 240, 255));
}

ren->RenderBegin();
Expand Down
8 changes: 4 additions & 4 deletions src/debug/DebugLines.cpp
Expand Up @@ -31,16 +31,16 @@ void DebugLines::Draw()

String info;
info = String::Build(drawPoint2.X, " x ", drawPoint2.Y);
g->drawtext_outline(drawPoint2.X+(drawPoint2.X>drawPoint1.X?3:-g->textwidth(info)-3), drawPoint2.Y+(drawPoint2.Y<drawPoint1.Y?-10:3), info, 255, 255, 255, 200);
g->BlendTextOutline({ drawPoint2.X+(drawPoint2.X>drawPoint1.X?3:-(g->TextSize(info).X-1)-3), drawPoint2.Y+(drawPoint2.Y<drawPoint1.Y?-10:3) }, info, RGBA<uint8_t>(255, 255, 255, 200));

info = String::Build(drawPoint1.X, " x ", drawPoint1.Y);
g->drawtext_outline(drawPoint1.X+(drawPoint2.X<drawPoint1.X?3:-g->textwidth(info)-2), drawPoint1.Y+(drawPoint2.Y>drawPoint1.Y?-10:3), info, 255, 255, 255, 200);
g->BlendTextOutline({ drawPoint1.X+(drawPoint2.X<drawPoint1.X?3:-(g->TextSize(info).X-1)-2), drawPoint1.Y+(drawPoint2.Y>drawPoint1.Y?-10:3) }, info, RGBA<uint8_t>(255, 255, 255, 200));

info = String::Build(std::abs(drawPoint2.X-drawPoint1.X));
g->drawtext_outline((drawPoint1.X+drawPoint2.X)/2-g->textwidth(info)/2, drawPoint1.Y+(drawPoint2.Y>drawPoint1.Y?-10:3), info, 255, 255, 255, 200);
g->BlendTextOutline({ (drawPoint1.X+drawPoint2.X)/2-(g->TextSize(info).X-1)/2, drawPoint1.Y+(drawPoint2.Y>drawPoint1.Y?-10:3) }, info, RGBA<uint8_t>(255, 255, 255, 200));

info = String::Build(std::abs(drawPoint2.Y-drawPoint1.Y));
g->drawtext_outline(drawPoint1.X+(drawPoint2.X<drawPoint1.X?3:-g->textwidth(info)-2), (drawPoint1.Y+drawPoint2.Y)/2-3, info, 255, 255, 255, 200);
g->BlendTextOutline({ drawPoint1.X+(drawPoint2.X<drawPoint1.X?3:-(g->TextSize(info).X-1)-2), (drawPoint1.Y+drawPoint2.Y)/2-3 }, info, RGBA<uint8_t>(255, 255, 255, 200));
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/debug/DebugParts.cpp
Expand Up @@ -47,8 +47,8 @@ void DebugParts::Draw()
g->addpixel(lpx, lpy+1, 255, 50, 50, 120);
g->addpixel(lpx, lpy-1, 255, 50, 50, 120);

g->fillrect(7, YRES-26, g->textwidth(info)+5, 14, 0, 0, 0, 180);
g->drawtext(10, YRES-22, info, 255, 255, 255, 255);
g->fillrect(7, YRES-26, g->TextSize(info).X + 4, 14, 0, 0, 0, 180);
g->BlendText({ 10, YRES-22 }, info, RGBA<uint8_t>(255, 255, 255, 255));
}

DebugParts::~DebugParts()
Expand Down
8 changes: 4 additions & 4 deletions src/debug/ElementPopulation.cpp
Expand Up @@ -44,7 +44,7 @@ void ElementPopulationDebug::Draw()
halfValString = String::Build(maxAverage/2);


g->fillrect(xStart-5, yBottom - 263, bars+10+Graphics::textwidth(maxValString)+10, 255 + 13, 0, 0, 0, 180);
g->fillrect(xStart-5, yBottom - 263, bars+10+Graphics::TextSize(maxValString).X+9, 255 + 13, 0, 0, 0, 180);

bars = 0;
for(int i = 0; i < PT_NUM; i++)
Expand Down Expand Up @@ -76,9 +76,9 @@ void ElementPopulationDebug::Draw()
}
}

g->drawtext(xStart + bars + 5, yBottom-5, "0", 255, 255, 255, 255);
g->drawtext(xStart + bars + 5, yBottom-132, halfValString, 255, 255, 255, 255);
g->drawtext(xStart + bars + 5, yBottom-260, maxValString, 255, 255, 255, 255);
g->BlendText({ xStart + bars + 5, yBottom-5 }, "0", RGBA<uint8_t>(255, 255, 255, 255));
g->BlendText({ xStart + bars + 5, yBottom-132 }, halfValString, RGBA<uint8_t>(255, 255, 255, 255));
g->BlendText({ xStart + bars + 5, yBottom-260 }, maxValString, RGBA<uint8_t>(255, 255, 255, 255));
}

ElementPopulationDebug::~ElementPopulationDebug()
Expand Down
9 changes: 2 additions & 7 deletions src/graphics/Graphics.cpp
Expand Up @@ -167,11 +167,6 @@ template class RasterDrawMethods<VideoBuffer>;
Graphics::Graphics()
{}

int Graphics::textwidth(const String &str)
{
return TextSize(str).X - 1;
}

void Graphics::draw_icon(int x, int y, Icon icon, unsigned char alpha, bool invert)
{
y--;
Expand Down Expand Up @@ -199,12 +194,12 @@ void Graphics::draw_icon(int x, int y, Icon icon, unsigned char alpha, bool inve
if(invert)
{
drawchar(x-11, y+1, 0xE04B, 0, 100, 0, alpha);
drawtext(x+2, y+1, "Vote", 0, 100, 0, alpha);
BlendText({ x+2, y+1 }, "Vote", RGBA<uint8_t>(0, 100, 0, alpha));
}
else
{
drawchar(x-11, y+1, 0xE04B, 0, 187, 18, alpha);
drawtext(x+2, y+1, "Vote", 0, 187, 18, alpha);
BlendText({ x+2, y+1 }, "Vote", RGBA<uint8_t>(0, 187, 18, alpha));
}
break;
case IconVoteDown:
Expand Down
4 changes: 0 additions & 4 deletions src/graphics/Graphics.h
Expand Up @@ -91,10 +91,6 @@ class Graphics: public RasterDrawMethods<Graphics>
};
static std::vector<RGB<uint8_t>> Gradient(std::vector<GradientStop> stops, int resolution);

//Font/text metrics
[[deprecated("Use TextSize().X - 1 (yes this is very bad code eww)")]]
static int textwidth(const String &s);

VideoBuffer DumpFrame();

void draw_icon(int x, int y, Icon icon, unsigned char alpha = 255, bool invert = false);
Expand Down
8 changes: 0 additions & 8 deletions src/graphics/RasterDrawMethods.h
Expand Up @@ -60,10 +60,6 @@ struct RasterDrawMethods

void Clear();

[[deprecated("Use BlendTextOutline")]]
int drawtext_outline(int x, int y, const String &, int r, int g, int b, int a);
[[deprecated("Use BlendText")]]
int drawtext(int x, int y, const String &, int r, int g, int b, int a);
[[deprecated("Use BlendChar")]]
int drawchar(int x, int y, String::value_type, int r, int g, int b, int a);
[[deprecated("Use AddChar")]]
Expand Down Expand Up @@ -92,8 +88,4 @@ struct RasterDrawMethods
void fillcircle(int x, int y, int rx, int ry, int r, int g, int b, int a);
[[deprecated("Use DrawFilledRect (beware off by 1)")]]
void clearrect(int x, int y, int w, int h);
[[deprecated("Use BlendImage")]]
void draw_image(pixel const *, int x, int y, int w, int h, int a);
[[deprecated("Use BlendImage")]]
void draw_image(VideoBuffer const *, int x, int y, int a);
};
24 changes: 0 additions & 24 deletions src/graphics/RasterDrawMethodsImpl.h
Expand Up @@ -401,18 +401,6 @@ String::const_iterator RasterDrawMethods<Derived>::TextFit(String const &str, in
return str.end();
}

template<typename Derived>
int RasterDrawMethods<Derived>::drawtext_outline(int x, int y, const String &s, int r, int g, int b, int a)
{
return x + BlendTextOutline(Vec2(x, y), s, RGBA<uint8_t>(r, g, b, a)).X;
}

template<typename Derived>
int RasterDrawMethods<Derived>::drawtext(int x, int y, const String &str, int r, int g, int b, int a)
{
return x + BlendText(Vec2(x, y), str, RGBA<uint8_t>(r, g, b, a)).X;
}

template<typename Derived>
int RasterDrawMethods<Derived>::drawchar(int x, int y, String::value_type c, int r, int g, int b, int a)
{
Expand Down Expand Up @@ -513,17 +501,5 @@ void RasterDrawMethods<Derived>::clearrect(int x, int y, int w, int h)
DrawFilledRect(RectSized(Vec2(x + 1, y + 1), Vec2(w - 1, h - 1)), 0x000000_rgb);
}

template<typename Derived>
void RasterDrawMethods<Derived>::draw_image(const pixel *img, int x, int y, int w, int h, int a)
{
BlendImage(img, a, RectSized(Vec2(x, y), Vec2(w, h)));
}

template<typename Derived>
void RasterDrawMethods<Derived>::draw_image(const VideoBuffer * vidBuf, int x, int y, int a)
{
BlendImage(vidBuf->Data(), a, RectSized(Vec2(x, y), vidBuf->Size()));
}

#undef video
#undef clipRect
8 changes: 4 additions & 4 deletions src/graphics/Renderer.cpp
Expand Up @@ -152,7 +152,7 @@ void Renderer::DrawSigns()
String text = currentSign.getDisplayText(sim, x, y, w, h);
clearrect(x, y, w+1, h);
drawrect(x, y, w+1, h, 192, 192, 192, 255);
drawtext(x+3, y+4, text, 255, 255, 255, 255);
BlendText({ x+3, y+4 }, text, RGBA<uint8_t>(255, 255, 255, 255));

if (currentSign.ju != sign::None)
{
Expand Down Expand Up @@ -417,7 +417,7 @@ void Renderer::render_parts()
if (mousePos.X>(nx-3) && mousePos.X<(nx+3) && mousePos.Y<(ny+3) && mousePos.Y>(ny-3)) //If mouse is in the head
{
String hp = String::Build(Format::Width(sim->parts[i].life, 3));
drawtext(mousePos.X-8-2*(sim->parts[i].life<100)-2*(sim->parts[i].life<10), mousePos.Y-12, hp, 255, 255, 255, 255);
BlendText(mousePos + Vec2{ -8-2*(sim->parts[i].life<100)-2*(sim->parts[i].life<10), -12 }, hp, RGBA<uint8_t>(255, 255, 255, 255));
}

if (findingElement == t)
Expand Down Expand Up @@ -980,7 +980,7 @@ void Renderer::DrawWalls()
// there is no velocity here, draw a streamline and continue
if (!xVel && !yVel)
{
drawtext(x*CELL, y*CELL-2, 0xE00D, 255, 255, 255, 128);
BlendText({ x*CELL, y*CELL-2 }, 0xE00D, RGBA<uint8_t>(255, 255, 255, 128));
addpixel(oldX, oldY, 255, 255, 255, 255);
continue;
}
Expand Down Expand Up @@ -1011,7 +1011,7 @@ void Renderer::DrawWalls()
xf += xVel;
yf += yVel;
}
drawtext(x*CELL, y*CELL-2, 0xE00D, 255, 255, 255, 128);
BlendText({ x*CELL, y*CELL-2 }, 0xE00D, RGBA<uint8_t>(255, 255, 255, 128));
}
break;
case 1:
Expand Down
8 changes: 4 additions & 4 deletions src/gui/dialogues/SaveIDMessage.cpp
Expand Up @@ -10,26 +10,26 @@
SaveIDMessage::SaveIDMessage(int id):
ui::Window(ui::Point((XRES-244)/2, (YRES-90)/2), ui::Point(244, 90))
{
int textWidth = Graphics::textwidth("Save ID");
int textWidth = Graphics::TextSize("Save ID").X - 1;
ui::Label * titleLabel = new ui::Label(ui::Point(4, 5), ui::Point(textWidth+20, 16), "Save ID");
titleLabel->SetTextColour(style::Colour::InformationTitle);
titleLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
titleLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
AddComponent(titleLabel);

textWidth = Graphics::textwidth("Saved Successfully!");
textWidth = Graphics::TextSize("Saved Successfully!").X - 1;
ui::Label * messageLabel = new ui::Label(ui::Point(4, 24), ui::Point(textWidth+20, 16), "Saved Successfully!");
messageLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
messageLabel->Appearance.VerticalAlign = ui::Appearance::AlignTop;
AddComponent(messageLabel);

textWidth = Graphics::textwidth("Click the box below to copy the save ID");
textWidth = Graphics::TextSize("Click the box below to copy the save ID").X - 1;
ui::Label * copyTextLabel = new ui::Label(ui::Point((Size.X-textWidth-20)/2, 35), ui::Point(textWidth+20, 16), "Click the box below to copy the save id");
copyTextLabel->SetTextColour(ui::Colour(150, 150, 150));
copyTextLabel->Appearance.HorizontalAlign = ui::Appearance::AlignCentre;
AddComponent(copyTextLabel);

textWidth = Graphics::textwidth(String::Build(id));
textWidth = Graphics::TextSize(String::Build(id)).X - 1;
ui::CopyTextButton * copyTextButton = new ui::CopyTextButton(ui::Point((Size.X-textWidth-10)/2, 50), ui::Point(textWidth+10, 18), String::Build(id), copyTextLabel);
AddComponent(copyTextButton);

Expand Down
2 changes: 1 addition & 1 deletion src/gui/elementsearch/ElementSearchActivity.cpp
Expand Up @@ -218,7 +218,7 @@ void ElementSearchActivity::OnDraw()
g->drawrect(Position.X+searchField->Position.X, Position.Y+searchField->Position.Y+searchField->Size.Y+8, searchField->Size.X, Size.Y-(searchField->Position.Y+searchField->Size.Y+8)-23, 255, 255, 255, 180);
if (toolTipPresence && toolTip.length())
{
g->drawtext(10, Size.Y+70, toolTip, 255, 255, 255, toolTipPresence>51?255:toolTipPresence*5);
g->BlendText({ 10, Size.Y+70 }, toolTip, RGBA<uint8_t>(255, 255, 255, toolTipPresence>51?255:toolTipPresence*5));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/font/FontEditor.cpp
Expand Up @@ -503,7 +503,7 @@ void FontEditor::OnDraw()
}
else
{
g->drawtext(8, 8, "No character", 255, 0, 0, 255);
g->BlendText({ 8, 8 }, "No character", RGBA<uint8_t>(255, 0, 0, 255));
}
}

Expand Down
38 changes: 19 additions & 19 deletions src/gui/game/GameView.cpp
Expand Up @@ -1278,16 +1278,16 @@ void GameView::ToolTip(ui::Point senderPosition, String toolTip)
else if(senderPosition.X > Size.X-BARSIZE)// < Size.Y-(quickOptionButtons.size()+1)*16)
{
this->toolTip = toolTip;
toolTipPosition = ui::Point(Size.X-27-Graphics::textwidth(toolTip), senderPosition.Y+3);
toolTipPosition = ui::Point(Size.X-27-(Graphics::TextSize(toolTip).X - 1), senderPosition.Y+3);
if(toolTipPosition.Y+10 > Size.Y-MENUSIZE)
toolTipPosition = ui::Point(Size.X-27-Graphics::textwidth(toolTip), Size.Y-MENUSIZE-10);
toolTipPosition = ui::Point(Size.X-27-(Graphics::TextSize(toolTip).X - 1), Size.Y-MENUSIZE-10);
isToolTipFadingIn = true;
}
// element tooltips
else
{
this->toolTip = toolTip;
toolTipPosition = ui::Point(Size.X-27-Graphics::textwidth(toolTip), Size.Y-MENUSIZE-10);
toolTipPosition = ui::Point(Size.X-27-(Graphics::TextSize(toolTip).X - 1), Size.Y-MENUSIZE-10);
isToolTipFadingIn = true;
}
}
Expand Down Expand Up @@ -1864,7 +1864,7 @@ void GameView::NotifyNotificationsChanged(GameModel * sender)
int currentY = YRES-23;
for (auto *notification : notifications)
{
int width = (Graphics::textwidth(notification->Message))+8;
int width = Graphics::TextSize(notification->Message).X + 7;
ui::Button * tempButton = new ui::Button(ui::Point(XRES-width-22, currentY), ui::Point(width, 15), notification->Message);
tempButton->SetActionCallback({ [notification] {
notification->Action();
Expand Down Expand Up @@ -2197,8 +2197,8 @@ void GameView::OnDraw()
break;
}
startY -= 14;
g->fillrect(startX-3, startY-3, Graphics::textwidth(message)+6, 14, 0, 0, 0, std::min(100, alpha));
g->drawtext(startX, startY, message, 255, 255, 255, alpha);
g->fillrect(startX-3, startY-3, Graphics::TextSize(message).X + 5, 14, 0, 0, 0, std::min(100, alpha));
g->BlendText({ startX, startY }, message, RGBA<uint8_t>(255, 255, 255, alpha));
(*iter).second -= 3;
}
}
Expand All @@ -2208,9 +2208,9 @@ void GameView::OnDraw()
{
String sampleInfo = String::Build("#", screenshotIndex, " ", String(0xE00E), " REC");

int textWidth = Graphics::textwidth(sampleInfo);
int textWidth = Graphics::TextSize(sampleInfo).X - 1;
g->fillrect(XRES-20-textWidth, 12, textWidth+8, 15, 0, 0, 0, 127);
g->drawtext(XRES-16-textWidth, 16, sampleInfo, 255, 50, 20, 255);
g->BlendText({ XRES-16-textWidth, 16 }, sampleInfo, RGBA<uint8_t>(255, 50, 20, 255));
}
else if(showHud)
{
Expand Down Expand Up @@ -2329,9 +2329,9 @@ void GameView::OnDraw()
sampleInfo << "Empty";
}

int textWidth = Graphics::textwidth(sampleInfo.Build());
int textWidth = Graphics::TextSize(sampleInfo.Build()).X - 1;
g->fillrect(XRES-20-textWidth, 12, textWidth+8, 15, 0, 0, 0, int(alpha*0.5f));
g->drawtext(XRES-16-textWidth, 16, sampleInfo.Build(), 255, 255, 255, int(alpha*0.75f));
g->BlendText({ XRES-16-textWidth, 16 }, sampleInfo.Build(), RGBA<uint8_t>(255, 255, 255, int(alpha*0.75f)));

if (wavelengthGfx)
{
Expand Down Expand Up @@ -2387,9 +2387,9 @@ void GameView::OnDraw()
format::RenderTemperature(sampleInfo, sample.AirTemperature, c->GetTemperatureScale());
}

textWidth = Graphics::textwidth(sampleInfo.Build());
auto textWidth = Graphics::TextSize(sampleInfo.Build()).X - 1;
g->fillrect(XRES-20-textWidth, 27, textWidth+8, 14, 0, 0, 0, int(alpha*0.5f));
g->drawtext(XRES-16-textWidth, 30, sampleInfo.Build(), 255, 255, 255, int(alpha*0.75f));
g->BlendText({ XRES-16-textWidth, 30 }, sampleInfo.Build(), RGBA<uint8_t>(255, 255, 255, int(alpha*0.75f)));
}
}

Expand All @@ -2415,37 +2415,37 @@ void GameView::OnDraw()
if (ren && ren->findingElement)
fpsInfo << " [FIND]";

int textWidth = Graphics::textwidth(fpsInfo.Build());
int textWidth = Graphics::TextSize(fpsInfo.Build()).X - 1;
int alpha = 255-introText*5;
g->fillrect(12, 12, textWidth+8, 15, 0, 0, 0, int(alpha*0.5));
g->drawtext(16, 16, fpsInfo.Build(), 32, 216, 255, int(alpha*0.75));
g->BlendText({ 16, 16 }, fpsInfo.Build(), RGBA<uint8_t>(32, 216, 255, int(alpha*0.75)));
}

//Tooltips
if(infoTipPresence)
{
int infoTipAlpha = (infoTipPresence>50?50:infoTipPresence)*5;
g->drawtext_outline((XRES-Graphics::textwidth(infoTip))/2, (YRES/2)-2, infoTip, 255, 255, 255, infoTipAlpha);
g->BlendTextOutline({ (XRES - (Graphics::TextSize(infoTip).X - 1)) / 2, YRES / 2 - 2 }, infoTip, RGBA<uint8_t>(255, 255, 255, infoTipAlpha));
}

if(toolTipPresence && toolTipPosition.X!=-1 && toolTipPosition.Y!=-1 && toolTip.length())
{
if (toolTipPosition.Y == Size.Y-MENUSIZE-10)
g->drawtext_outline(toolTipPosition.X, toolTipPosition.Y, toolTip, 255, 255, 255, toolTipPresence>51?255:toolTipPresence*5);
g->BlendTextOutline(toolTipPosition, toolTip, RGBA<uint8_t>(255, 255, 255, toolTipPresence>51?255:toolTipPresence*5));
else
g->drawtext(toolTipPosition.X, toolTipPosition.Y, toolTip, 255, 255, 255, toolTipPresence>51?255:toolTipPresence*5);
g->BlendText(toolTipPosition, toolTip, RGBA<uint8_t>(255, 255, 255, toolTipPresence>51?255:toolTipPresence*5));
}

if(buttonTipShow > 0)
{
g->drawtext(16, Size.Y-MENUSIZE-24, buttonTip, 255, 255, 255, buttonTipShow>51?255:buttonTipShow*5);
g->BlendText({ 16, Size.Y-MENUSIZE-24 }, buttonTip, RGBA<uint8_t>(255, 255, 255, buttonTipShow>51?255:buttonTipShow*5));
}

//Introduction text
if(introText && showHud)
{
g->fillrect(0, 0, WINDOWW, WINDOWH, 0, 0, 0, introText>51?102:introText*2);
g->drawtext(16, 16, introTextMessage, 255, 255, 255, introText>51?255:introText*5);
g->BlendText({ 16, 16 }, introTextMessage, RGBA<uint8_t>(255, 255, 255, introText>51?255:introText*5));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/game/SignTool.cpp
Expand Up @@ -170,7 +170,7 @@ void SignWindow::DoDraw()
String text = currentSign.getDisplayText(sim, x, y, w, h);
g->clearrect(x, y, w+1, h);
g->drawrect(x, y, w+1, h, 192, 192, 192, 255);
g->drawtext(x+3, y+4, text, 255, 255, 255, 255);
g->BlendText({ x+3, y+4 }, text, RGBA<uint8_t>(255, 255, 255, 255));

if (currentSign.ju != sign::None)
{
Expand Down

0 comments on commit f5cbc30

Please sign in to comment.