MCPcopy Create free account
hub / github.com/axmolengine/axmol / setTextFontSize

Method setTextFontSize

core/ui/UITextFieldEx.cpp:338–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338void TextFieldEx::setTextFontSize(float size)
339{
340 if (_systemFontUsed)
341 {
342 _renderLabel->setSystemFontSize(size);
343 }
344 else
345 {
346 TTFConfig config = _renderLabel->getTTFConfig();
347 config.fontSize = size;
348 _renderLabel->setTTFConfig(config);
349 }
350
351 _fontSize = size;
352
353 using namespace std::string_view_literals;
354 _asteriskWidth = internalCalcStringWidth("*"sv, _fontName, _fontSize);
355}
356
357float TextFieldEx::getTextFontSize() const
358{

Callers

nothing calls this directly

Calls 3

internalCalcStringWidthFunction · 0.85
setSystemFontSizeMethod · 0.80
setTTFConfigMethod · 0.80

Tested by

no test coverage detected