@Override protected void onManagedUpdate(final float pSecondsElapsed) { super.onManagedUpdate(pSecondsElapsed); if (!mIsLarge && mIsTouched) { this.registerEntityModifier( new ScaleModifier(mGROW_DURATION_SECONDS, mNormalScale, mGrownScale) { @Override protected void onModifierFinished(final IEntity pItem) { super.onModifierFinished(pItem); mIsLarge = true; } }); } else if (mIsLarge && !mIsTouched) { this.registerEntityModifier( new ScaleModifier(mGROW_DURATION_SECONDS, mGrownScale, mNormalScale) { @Override protected void onModifierFinished(final IEntity pItem) { super.onModifierFinished(pItem); mIsLarge = false; if (mIsClicked) { onClick(); mIsClicked = false; } } }); mIsLarge = false; } if (mIsEnabled) { if (this.getAlpha() != mENABLED_ALPHA) this.setAlpha(mENABLED_ALPHA); } else { if (this.getAlpha() != mDISABLED_ALPHA) this.setAlpha(mDISABLED_ALPHA); } if (isStateTrue != checkState()) { isStateTrue = checkState(); if (isStateTrue) this.setText(mTrueText); else this.setText(mFalseText); } }