MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / updateDisplayedLabel

Method updateDisplayedLabel

Source/TextInputNode.cpp:244–261  ·  view source on GitHub ↗

Updates the displayed label

Source from the content-addressed store, hash-verified

242
243// Updates the displayed label
244void TextInputNode::updateDisplayedLabel()
245{
246 if (!_displayedLabel || !_cursor)
247 return;
248
249 if (_textField->getString().empty())
250 {
251 _displayedLabel->setString(_placeholderString);
252 _displayedLabel->setColor(_placeholderColor);
253 }
254 else
255 {
256 _displayedLabel->setString(_textField->getString());
257 _displayedLabel->setColor(_textColor);
258 }
259
260 updateDisplayedLabelScale();
261}
262
263// Updates the displayed label's scale
264void TextInputNode::updateDisplayedLabelScale()

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.80
getStringMethod · 0.80
setStringMethod · 0.45
setColorMethod · 0.45

Tested by

no test coverage detected