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

Method loadTexturePressed

core/ui/UIEditBox/UIEditBox.cpp:246–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void EditBox::loadTexturePressed(std::string_view pressed, TextureResType texType)
247{
248 _pressedFileName = pressed;
249 _pressedTexType = texType;
250 bool textureLoaded = true;
251 if (pressed.empty())
252 {
253 _pressedRenderer->resetRender();
254 textureLoaded = false;
255 }
256 else
257 {
258 switch (texType)
259 {
260 case TextureResType::LOCAL:
261 _pressedRenderer->initWithFile(pressed);
262 break;
263 case TextureResType::PLIST:
264 _pressedRenderer->initWithSpriteFrameName(pressed);
265 break;
266 default:
267 break;
268 }
269 }
270 this->setupPressedTexture(textureLoaded);
271}
272
273void EditBox::setupPressedTexture(bool textureLoaded)
274{

Callers

nothing calls this directly

Calls 6

setupPressedTextureMethod · 0.95
emptyMethod · 0.45
resetRenderMethod · 0.45
initWithFileMethod · 0.45
initWithSpriteFrameMethod · 0.45

Tested by

no test coverage detected