MCPcopy Create free account
hub / github.com/EasyRPG/Player / TextDrawUnderlined

Function TextDrawUnderlined

src/window_interpreter.cpp:349–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347
348namespace {
349 void TextDrawUnderlined(BitmapRef contents, int x, int y, int color, std::string_view text) {
350 auto sys = Cache::SystemOrBlack();
351 auto rect = Rect(x, y + 12, text.length() * 6, 1);
352 // Draw shadow first
353 contents->FillRect(Rect(rect.x + 1, rect.y + 1, rect.width, rect.height), sys->GetColorAt(18, 34));
354
355 //Draw the actual text
356 contents->TextDraw(x, y, color, text);
357
358 // Draw underline
359 contents->FillRect(rect, sys->GetColorAt(color % 10 * 16 + 2, color / 10 * 16 + 48 + 15));
360 }
361}
362
363void Window_Interpreter::UiSubActionLine::Draw(BitmapRef contents, Rect rect) const {

Callers 1

DrawMethod · 0.85

Calls 4

FillRectMethod · 0.80
GetColorAtMethod · 0.80
TextDrawMethod · 0.80
RectClass · 0.70

Tested by

no test coverage detected