Chat control's child elements can now have a different height than their container.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@412 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Robert Zubeck
2008-02-13 22:34:28 +00:00
parent 6913ba2d08
commit d322b94545
+5 -4
View File
@@ -48,7 +48,8 @@ public class ChatControl extends HBox
}
public function ChatControl (
ctx :CrowdContext, sendButtonLabel :String = "send", height :Number = NaN)
ctx :CrowdContext, sendButtonLabel :String = "send",
height :Number = NaN, controlHeight :Number = NaN)
{
_ctx = ctx;
_chatDtr = _ctx.getChatDirector();
@@ -62,9 +63,9 @@ public class ChatControl extends HBox
_but = new CommandButton(sendButtonLabel, sendChat);
addChild(_but);
if (!isNaN(height)) {
_txt.height = height;
_but.height = height;
if (!isNaN(controlHeight)) {
_txt.height = controlHeight;
_but.height = controlHeight;
}
addEventListener(Event.ADDED_TO_STAGE, handleAddRemove);