From caf3f40dffd94e79997da95f88a62dd386b7d252 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 14 Mar 2007 03:48:42 +0000 Subject: [PATCH] Allow text inside the and tags to contain the tooltip for a game configuration. - Removed ident translation of _ to ' ' for display purposes. Just use a nice name. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@246 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../ezgame/client/EZGameConfigurator.as | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/as/com/threerings/ezgame/client/EZGameConfigurator.as b/src/as/com/threerings/ezgame/client/EZGameConfigurator.as index 28bb32fb..10618a8b 100644 --- a/src/as/com/threerings/ezgame/client/EZGameConfigurator.as +++ b/src/as/com/threerings/ezgame/client/EZGameConfigurator.as @@ -79,13 +79,17 @@ public class EZGameConfigurator extends FlexGameConfigurator /** * Add a control that came from parsing our custom option XML. */ - protected function addXMLControl (ident :String, control :UIComponent) :void + protected function addXMLControl (spec :XML, control :UIComponent) :void { - var name :String = ident.replace("_", " "); - var lbl :Label = new Label(); - lbl.text = name + ":"; - addControl(lbl, control); + var ident :String = String(spec.@ident); + var tip :String = StringUtil.trim(String(spec.text())); + var lbl :Label = new Label(); + lbl.text = ident + ":"; + lbl.toolTip = tip; + control.toolTip = tip; + + addControl(lbl, control); _customConfigs.push(ident, control); } @@ -111,7 +115,7 @@ public class EZGameConfigurator extends FlexGameConfigurator slider.liveDragging = true; slider.snapInterval = 1; - addXMLControl(spec.@ident, new LabeledSlider(slider)); + addXMLControl(spec, new LabeledSlider(slider)); } /** @@ -141,7 +145,7 @@ public class EZGameConfigurator extends FlexGameConfigurator box.dataProvider = choices; box.selectedIndex = startDex; - addXMLControl(spec.@ident, box); + addXMLControl(spec, box); } /** @@ -161,7 +165,7 @@ public class EZGameConfigurator extends FlexGameConfigurator var box :CheckBox = new CheckBox(); box.selected = ("true" == startStr); - addXMLControl(spec.@ident, box); + addXMLControl(spec, box); } override protected function flushGameConfig () :void