mirror of https://github.com/axmolengine/axmol.git
Update UIAbstractCheckButton.cpp (#18858)
This factory method to create a checkbox instance was not working (UICheckBox.cpp:79): CheckBox* CheckBox::create(const std::string& backGround, const std::string& cross, TextureResType texType) Because the program tries to load missing textures. I just added some exit conditions to avoid it.
This commit is contained in:
parent
c8c5fc74f7
commit
d41820b14b
|
@ -173,7 +173,8 @@ void AbstractCheckButton::loadTextureBackGroundSelected(const std::string& backG
|
|||
{
|
||||
_backGroundSelectedFileName = backGroundSelected;
|
||||
_isBackgroundSelectedTextureLoaded = !backGroundSelected.empty();
|
||||
|
||||
if (!_isBackgroundSelectedTextureLoaded) return;
|
||||
|
||||
_backGroundSelectedTexType = texType;
|
||||
switch (_backGroundSelectedTexType)
|
||||
{
|
||||
|
@ -236,6 +237,7 @@ void AbstractCheckButton::loadTextureBackGroundDisabled(const std::string& backG
|
|||
{
|
||||
_backGroundDisabledFileName = backGroundDisabled;
|
||||
_isBackgroundDisabledTextureLoaded = !backGroundDisabled.empty();
|
||||
if (!_isBackgroundDisabledTextureLoaded) return;
|
||||
|
||||
_backGroundDisabledTexType = texType;
|
||||
switch (_backGroundDisabledTexType)
|
||||
|
@ -269,6 +271,7 @@ void AbstractCheckButton::loadTextureFrontCrossDisabled(const std::string& front
|
|||
{
|
||||
_frontCrossDisabledFileName = frontCrossDisabled;
|
||||
_isFrontCrossDisabledTextureLoaded = !frontCrossDisabled.empty();
|
||||
if (!_isFrontCrossDisabledTextureLoaded) return;
|
||||
|
||||
_frontCrossDisabledTexType = texType;
|
||||
switch (_frontCrossDisabledTexType)
|
||||
|
|
Loading…
Reference in New Issue