Use the 'enabled' property setter/getter.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@748 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -89,6 +89,20 @@ public class ChatControl extends HBox
|
||||
return _but;
|
||||
}
|
||||
|
||||
override public function set enabled (en :Boolean) :void
|
||||
{
|
||||
// don't call super (and the only time these aren't around is during construction)
|
||||
if (_txt != null) {
|
||||
_txt.enabled = en;
|
||||
_but.enabled = en;
|
||||
}
|
||||
}
|
||||
|
||||
override public function get enabled () :Boolean
|
||||
{
|
||||
return _txt.enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request focus to this chat control.
|
||||
*/
|
||||
@@ -97,15 +111,6 @@ public class ChatControl extends HBox
|
||||
_txt.setFocus();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables or disables our chat input.
|
||||
*/
|
||||
public function setEnabled (enabled :Boolean) :void
|
||||
{
|
||||
_txt.enabled = enabled;
|
||||
_but.enabled = enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the chat director to which we should send our chat. Pass null to restore our
|
||||
* default chat director.
|
||||
|
||||
Reference in New Issue
Block a user