organize/style things better

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@279 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Nathan Curtis
2007-04-11 22:12:24 +00:00
parent cccc3a308e
commit 74ffcaaf61
2 changed files with 17 additions and 16 deletions
@@ -89,8 +89,8 @@ public class EZGameConfigurator extends FlexGameConfigurator
var lbl :Label = new Label(); var lbl :Label = new Label();
lbl.text = name + ":"; lbl.text = name + ":";
lbl.styleName = "lobbyLabel"; lbl.styleName = "lobbyLabel";
lbl.toolTip = tip; lbl.toolTip = tip == "" ? name : tip;
control.toolTip = tip; control.toolTip = tip == "" ? name : tip;
addControl(lbl, control); addControl(lbl, control);
_customConfigs.push(ident, control); _customConfigs.push(ident, control);
@@ -24,9 +24,8 @@ package com.threerings.parlor.game.client {
import mx.core.Container; import mx.core.Container;
import mx.core.UIComponent; import mx.core.UIComponent;
import mx.containers.Grid; import mx.containers.HBox;
import mx.containers.GridItem; import mx.containers.Tile;
import mx.containers.GridRow;
import com.threerings.parlor.game.data.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.util.ParlorContext; import com.threerings.parlor.util.ParlorContext;
@@ -48,7 +47,10 @@ public /*abstract*/ class FlexGameConfigurator extends GameConfigurator
*/ */
public function getContainer () :Container public function getContainer () :Container
{ {
return _grid; // mimic the style of the seats grid for consistency
_tile.width = 375;
_tile.styleName = "seatsGrid";
return _tile;
} }
/** /**
@@ -61,18 +63,17 @@ public /*abstract*/ class FlexGameConfigurator extends GameConfigurator
public function addControl ( public function addControl (
label :UIComponent, control :UIComponent) :void label :UIComponent, control :UIComponent) :void
{ {
var row :GridRow = new GridRow(); var item :HBox = new HBox();
var labelItem :GridItem = new GridItem(); item.width = 175;
var controlItem :GridItem = new GridItem(); item.setStyle("horizontalGap", 5);
label.width = 70;
labelItem.addChild(label); item.addChild(label);
controlItem.addChild(control); control.width = 100;
row.addChild(labelItem); item.addChild(control);
row.addChild(controlItem); _tile.addChild(item);
_grid.addChild(row);
} }
/** The grid on which the config options are placed. */ /** The grid on which the config options are placed. */
protected var _grid :Grid = new Grid(); protected var _tile :Tile = new Tile();
} }
} }