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

Method loadTextureBackGroundSelected

core/ui/UIAbstractCheckButton.cpp:174–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174void AbstractCheckButton::loadTextureBackGroundSelected(std::string_view backGroundSelected, TextureResType texType)
175{
176 _backGroundSelectedFileName = backGroundSelected;
177 _isBackgroundSelectedTextureLoaded = !backGroundSelected.empty();
178 if (!_isBackgroundSelectedTextureLoaded)
179 return;
180
181 _backGroundSelectedTexType = texType;
182 switch (_backGroundSelectedTexType)
183 {
184 case TextureResType::LOCAL:
185 _backGroundSelectedBoxRenderer->setTexture(backGroundSelected);
186 break;
187 case TextureResType::PLIST:
188 _backGroundSelectedBoxRenderer->setSpriteFrame(backGroundSelected);
189 break;
190 default:
191 break;
192 }
193 this->setupBackgroundSelectedTexture();
194}
195
196void AbstractCheckButton::loadTextureBackGroundSelected(SpriteFrame* spriteframe)
197{

Calls 4

emptyMethod · 0.45
setTextureMethod · 0.45
setSpriteFrameMethod · 0.45

Tested by

no test coverage detected