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

Method loadTextureNormal

core/ui/UIEditBox/UIEditBox.cpp:198–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void EditBox::loadTextureNormal(std::string_view normal, TextureResType texType)
199{
200 _normalFileName = normal;
201 _normalTexType = texType;
202 bool textureLoaded = true;
203 if (normal.empty())
204 {
205 _normalRenderer->resetRender();
206 textureLoaded = false;
207 }
208 else
209 {
210 switch (texType)
211 {
212 case TextureResType::LOCAL:
213 _normalRenderer->initWithFile(normal);
214 break;
215 case TextureResType::PLIST:
216 _normalRenderer->initWithSpriteFrameName(normal);
217 break;
218 default:
219 break;
220 }
221 }
222 // FIXME: https://github.com/cocos2d/cocos2d-x/issues/12249
223 if (!_ignoreSize && _customSize.equals(Vec2::ZERO))
224 {
225 _customSize = _normalRenderer->getContentSize();
226 }
227 this->setupNormalTexture(textureLoaded);
228}
229
230void EditBox::setupNormalTexture(bool textureLoaded)
231{

Callers

nothing calls this directly

Calls 8

setupNormalTextureMethod · 0.95
emptyMethod · 0.45
resetRenderMethod · 0.45
initWithFileMethod · 0.45
equalsMethod · 0.45
getContentSizeMethod · 0.45
initWithSpriteFrameMethod · 0.45

Tested by

no test coverage detected