Use GridUtil.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@496 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2007-11-13 22:38:54 +00:00
parent 34a6d3e963
commit 8ac8a8c6ea
@@ -25,10 +25,11 @@ import mx.core.Container;
import mx.core.UIComponent; import mx.core.UIComponent;
import mx.containers.Grid; import mx.containers.Grid;
import mx.containers.GridItem;
import mx.containers.GridRow; import mx.containers.GridRow;
import mx.containers.HBox; import mx.containers.HBox;
import com.threerings.flex.GridUtil;
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;
@@ -71,20 +72,13 @@ public /*abstract*/ class FlexGameConfigurator extends GameConfigurator
_gridRow = new GridRow(); _gridRow = new GridRow();
_grid.addChild(_gridRow); _grid.addChild(_gridRow);
} }
_gridRow.addChild(wrapItem(label)); GridUtil.addToRow(_gridRow, label);
_gridRow.addChild(wrapItem(control)); GridUtil.addToRow(_gridRow, control);
if (_gridRow.numChildren == _columns * 2) { if (_gridRow.numChildren == _columns * 2) {
_gridRow = null; _gridRow = null;
} }
} }
protected function wrapItem (component :UIComponent) :GridItem
{
var item :GridItem = new GridItem();
item.addChild(component);
return item;
}
/** 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 _grid :Grid = new Grid();