MeasureRunWidth
function · ui · primitive
- Address
0x772ae0· 119 bytes, up to0x772b56- Signature
float __thiscall (void *this, const char *text, int32_t bytes)- Meaning
- Measures the width of a byte range of the label's text, escapes giving none
- Confidence
- verified, proof one
- Finding
- ui/editboxmarkup#how-the-box-draws-and-measures
- Test
ui::textglue_scale_mul
Finding: How the box draws and measures in ui: EditBox markup
The label gets the raw text from the scroll position, or, when that position falls inside a colour span (the
first escape in view is a |r), the governing |c copied to the front of the visible text. The caret's
x is the width of the raw bytes from the line start to the cursor measured by the same kernel, which gives
every escape no width, so the caret sits right after the last drawn glyph. Kerning looks past escapes to the next
visible character. A password box masks every raw byte with *, so a link's whole markup shows as stars.
The derivation is in the doc.
Callers 4
- GameTooltipSize ui
- CSimpleEditBox::GetIndexAtPoint ui
- CSimpleEditBox::PlaceCaret ui
- CSimpleEditBox::PlaceSelectionPiece ui
Callees 3
- TextBlockGetTextExtent unassigned
- SStrLen storm
- CSimpleFontString::GetTextHeight ui
Calls and jumps by a bare address, from tables/calls.tsv.