MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / InsertEllipsis

Method InsertEllipsis

Sources/Jazz2/UI/FormattedTextBlock.cpp:811–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

809 }
810
811 void FormattedTextBlock::InsertEllipsis(Vector2f& currentLocation, Colorf currentColor, float scale, float charSpacing, float lineSpacing, bool allowVariance, float maxWidth, float* charFitWidths)
812 {
813 std::int32_t charFit;
814 Vector2f size = _font->MeasureStringEx("..."_s, scale, charSpacing, maxWidth, &charFit, charFitWidths);
815 if (charFit > 0) {
816 _parts.emplace_back(Ellipsis, charFit, currentLocation,
817 size.Y * lineSpacing, currentColor, scale, charSpacing, allowVariance);
818 currentLocation.X += charFitWidths[charFit - 1];
819 }
820 }
821
822 void FormattedTextBlock::InsertDottedUnderline(Part& part, float width)
823 {

Callers

nothing calls this directly

Calls 2

MeasureStringExMethod · 0.80
emplace_backMethod · 0.80

Tested by

no test coverage detected