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

Method DrawMaskW

src/TextEngine/EntryText.cpp:600–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598}
599
600void CEntryText::DrawMaskW(
601 uint8_t font, uint16_t color, int x, int y, TEXT_ALIGN_TYPE align, uint16_t flags)
602{
603 const auto len = (int)Length();
604 wstr_t str = {};
605 for (int i = 0; i < len; i++)
606 {
607 str += L"*";
608 }
609
610 if (len != 0)
611 {
612 g_FontManager.DrawW(font, str, color, x + DrawOffset, y, 30, 0, TS_LEFT, flags);
613 }
614
615 if (this == g_EntryPointer)
616 {
617 if (m_Position != 0)
618 {
619 str.resize(m_Position);
620 x += g_FontManager.GetWidthW(font, str);
621 }
622 g_FontManager.DrawW(font, L"_", color, x + DrawOffset, y, 30, 0, TS_LEFT, flags);
623 }
624}
625
626void CEntryText::RemoveSequence(int startPos, int length)
627{

Callers

nothing calls this directly

Calls 3

resizeMethod · 0.80
GetWidthWMethod · 0.80
DrawWMethod · 0.45

Tested by

no test coverage detected