| 172 | } |
| 173 | |
| 174 | void 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 | |
| 196 | void AbstractCheckButton::loadTextureBackGroundSelected(SpriteFrame* spriteframe) |
| 197 | { |
no test coverage detected