fix FUISprite gray to normal doesn't work

This commit is contained in:
halx99 2020-12-10 16:54:59 +08:00
parent e906b27039
commit c3ad19df96
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ void FUISprite::setScaleByTile(bool value)
void FUISprite::setGrayed(bool value)
{
#if defined(ENGINEX_VERSION)
Sprite::setProgramState(backend::ProgramType::GRAY_SCALE);
Sprite::setProgramState(value ? backend::ProgramType::GRAY_SCALE : backend::ProgramType::POSITION_TEXTURE_COLOR);
#elif COCOS2D_VERSION >= 0x00040000
auto isETC1 = getTexture() && getTexture()->getAlphaTextureName();
if (value) {