Pet peeve: avoid "if (true) then true else false" code.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@373 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Ray Greenwell
2007-12-12 18:20:34 +00:00
parent 1074d68d5f
commit cb704de5fa
@@ -84,7 +84,7 @@ public class DisablingButton extends SimpleButton
updateState();
}
override public function get mouseEnabled() :Boolean
override public function get mouseEnabled () :Boolean
{
return _mouseEnabled;
}
@@ -101,7 +101,7 @@ public class DisablingButton extends SimpleButton
super.upState = ((null != _disabledState && !super.enabled) ? _disabledState : _upState);
// mouseEnabled is always false when the button is disabled
super.mouseEnabled = (super.enabled ? _mouseEnabled : false);
super.mouseEnabled = super.enabled && _mouseEnabled;
}
protected var _disabledState :DisplayObject;