| 137 | } |
| 138 | |
| 139 | void 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 | |
| 159 | void AbstractCheckButton::setupBackgroundTexture() |
| 160 | { |