MCPcopy Create free account
hub / github.com/crossuo/crossuo / DrawMaskA

Method DrawMaskA

src/TextEngine/EntryText.cpp:572–598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570}
571
572void CEntryText::DrawMaskA(
573 uint8_t font, uint16_t color, int x, int y, TEXT_ALIGN_TYPE align, uint16_t flags)
574{
575 const auto len = (int)Length();
576 astr_t str{};
577 for (int i = 0; i < len; i++)
578 {
579 str += "*";
580 }
581
582 if (len != 0)
583 {
584 g_FontManager.DrawA(font, str, color, x + DrawOffset, y);
585 }
586
587 if (this == g_EntryPointer)
588 {
589 const int offsetTable[] = { 1, 2, 1, 1, 1, 2, 1, 1, 2, 2 };
590 const int offsY = offsetTable[font % 10];
591 if (m_Position != 0)
592 {
593 str.resize(m_Position);
594 x += g_FontManager.GetWidthA(font, str);
595 }
596 g_FontManager.DrawA(font, "_", color, x + DrawOffset, y + offsY);
597 }
598}
599
600void CEntryText::DrawMaskW(
601 uint8_t font, uint16_t color, int x, int y, TEXT_ALIGN_TYPE align, uint16_t flags)

Callers

nothing calls this directly

Calls 3

resizeMethod · 0.80
GetWidthAMethod · 0.80
DrawAMethod · 0.45

Tested by

no test coverage detected