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

Method loadTextureBackGround

core/ui/UIAbstractCheckButton.cpp:139–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139void AbstractCheckButton::loadTextureBackGround(std::string_view backGround, TextureResType texType)
140{
141 _backGroundFileName = backGround;
142
143 _backGroundTexType = texType;
144 switch (_backGroundTexType)
145 {
146 case TextureResType::LOCAL:
147 _backGroundBoxRenderer->setTexture(backGround);
148 break;
149 case TextureResType::PLIST:
150 _backGroundBoxRenderer->setSpriteFrame(backGround);
151 break;
152 default:
153 break;
154 }
155
156 this->setupBackgroundTexture();
157}
158
159void AbstractCheckButton::setupBackgroundTexture()
160{

Calls 3

setTextureMethod · 0.45
setSpriteFrameMethod · 0.45

Tested by 1

initMethod · 0.64