this can't possibly the be the "right way" to i18n actionscript stuff in vilya. Do we have a better
way lined up for this? git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@277 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -88,6 +88,7 @@ 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.toolTip = tip;
|
lbl.toolTip = tip;
|
||||||
control.toolTip = tip;
|
control.toolTip = tip;
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ public class DefaultFlexTableConfigurator extends TableConfigurator
|
|||||||
*/
|
*/
|
||||||
public function DefaultFlexTableConfigurator (
|
public function DefaultFlexTableConfigurator (
|
||||||
desiredPlayers :int, minPlayers :int = -1, maxPlayers :int = -1,
|
desiredPlayers :int, minPlayers :int = -1, maxPlayers :int = -1,
|
||||||
allowPrivate :Boolean = false)
|
allowPrivate :Boolean = false, playersXlate :String = "Players: ",
|
||||||
|
privateXlate :String = "Private: ")
|
||||||
{
|
{
|
||||||
if (minPlayers < 0) {
|
if (minPlayers < 0) {
|
||||||
minPlayers = desiredPlayers;
|
minPlayers = desiredPlayers;
|
||||||
@@ -76,6 +77,9 @@ public class DefaultFlexTableConfigurator extends TableConfigurator
|
|||||||
if (allowPrivate) {
|
if (allowPrivate) {
|
||||||
_privateCheck = new CheckBox();
|
_privateCheck = new CheckBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_playersXlate = playersXlate;
|
||||||
|
_privateXlate = privateXlate;
|
||||||
}
|
}
|
||||||
|
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
@@ -87,17 +91,17 @@ public class DefaultFlexTableConfigurator extends TableConfigurator
|
|||||||
(_gameConfigurator as FlexGameConfigurator);
|
(_gameConfigurator as FlexGameConfigurator);
|
||||||
|
|
||||||
if (_playerSlider != null) {
|
if (_playerSlider != null) {
|
||||||
// TODO: proper translation
|
|
||||||
var playerLabel :Label = new Label();
|
var playerLabel :Label = new Label();
|
||||||
playerLabel.text = "Players:";
|
playerLabel.text = _playersXlate;
|
||||||
|
playerLabel.styleName = "lobbyLabel";
|
||||||
|
|
||||||
gconf.addControl(playerLabel, new LabeledSlider(_playerSlider));
|
gconf.addControl(playerLabel, new LabeledSlider(_playerSlider));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_privateCheck != null) {
|
if (_privateCheck != null) {
|
||||||
// TODO: proper translation
|
|
||||||
var privateLabel :Label = new Label();
|
var privateLabel :Label = new Label();
|
||||||
privateLabel.text = "Private:";
|
privateLabel.text = _privateXlate;
|
||||||
|
privateLabel.styleName = "lobbyLabel";
|
||||||
gconf.addControl(privateLabel, _privateCheck);
|
gconf.addControl(privateLabel, _privateCheck);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,5 +131,9 @@ public class DefaultFlexTableConfigurator extends TableConfigurator
|
|||||||
/** A checkbox to allow the table creator to specify if the table is
|
/** A checkbox to allow the table creator to specify if the table is
|
||||||
* private. */
|
* private. */
|
||||||
protected var _privateCheck :CheckBox;
|
protected var _privateCheck :CheckBox;
|
||||||
|
|
||||||
|
/** Translation strings passed in by the caller */
|
||||||
|
protected var _playersXlate :String;
|
||||||
|
protected var _privateXlate :String;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user