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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user