private void __touchEnd()
{
if (_down)
{
if (this.displayObject == null || this.displayObject.isDisposed)
return;
_down = false;
if (_mode == ButtonMode.Common)
{
if (this.grayed && _buttonController != null && _buttonController.HasPage(DISABLED))
SetState(DISABLED);
else if (_over)
SetState(OVER);
else
SetState(UP);
}
else
{
if (!_over
&& _buttonController != null
&& (_buttonController.selectedPage == OVER || _buttonController.selectedPage == SELECTED_OVER))
{
SetCurrentState();
}
}
}
}