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

Method initInactiveLabels

core/ui/UIEditBox/UIEditBoxImpl-common.cpp:91–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void EditBoxImplCommon::initInactiveLabels(const Vec2& size)
92{
93 const char* pDefaultFontName = this->getNativeDefaultFontName();
94
95 _label = Label::create();
96 _label->setAnchorPoint(Vec2(0.0f, 1.0f));
97 _label->setOverflow(Label::Overflow::CLAMP);
98 _label->setVisible(false);
99 _label->setGlobalZOrder(_editBox->getGlobalZOrder());
100 _editBox->addChild(_label, kLabelZOrder);
101
102 _labelPlaceHolder = Label::create();
103 _labelPlaceHolder->setAnchorPoint(Vec2(0.0f, 1.0f));
104 _labelPlaceHolder->setTextColor(Color4B::GRAY);
105 _labelPlaceHolder->enableWrap(false);
106 _labelPlaceHolder->setGlobalZOrder(_editBox->getGlobalZOrder());
107 _editBox->addChild(_labelPlaceHolder, kLabelZOrder);
108
109 setFont(pDefaultFontName, size.height * 2 / 3);
110 setPlaceholderFont(pDefaultFontName, size.height * 2 / 3);
111}
112
113void EditBoxImplCommon::placeInactiveLabels(const Vec2& size)
114{

Callers

nothing calls this directly

Calls 10

createFunction · 0.85
enableWrapMethod · 0.80
Vec2Function · 0.50
setAnchorPointMethod · 0.45
setOverflowMethod · 0.45
setVisibleMethod · 0.45
setGlobalZOrderMethod · 0.45
addChildMethod · 0.45
setTextColorMethod · 0.45

Tested by

no test coverage detected