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

Method setTitleLabel

core/ui/UIButton.cpp:172–184  ·  view source on GitHub ↗

replaces the current Label node with a new one */

Source from the content-addressed store, hash-verified

170
171/** replaces the current Label node with a new one */
172void Button::setTitleLabel(Label* label)
173{
174 if (_titleRenderer != label)
175 {
176 AX_SAFE_RELEASE(_titleRenderer);
177 _titleRenderer = label;
178 AX_SAFE_RETAIN(_titleRenderer);
179
180 addProtectedChild(_titleRenderer, TITLE_RENDERER_Z, -1);
181 updateTitleLocation();
182 updateContentSize();
183 }
184}
185
186/** returns the current Label being used */
187Label* Button::getTitleLabel() const

Callers 2

needsLayoutMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected