From a8521ecb84da35e8db3b186ed062e3fe5ccba123 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 14 Feb 2007 03:44:36 +0000 Subject: [PATCH] Use some of my acquired special knowledge. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@188 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/as/com/threerings/ezgame/PlayersDisplay.as | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/as/com/threerings/ezgame/PlayersDisplay.as b/src/as/com/threerings/ezgame/PlayersDisplay.as index 4c686d38..281b9ae7 100644 --- a/src/as/com/threerings/ezgame/PlayersDisplay.as +++ b/src/as/com/threerings/ezgame/PlayersDisplay.as @@ -58,7 +58,7 @@ public class PlayersDisplay extends Sprite label.y = y; addChild(label); y += label.textHeight + pad; - maxWidth = label.textWidth; + maxWidth = label.textWidth + TEXTWIDTH_ADD; } var players :Array = _gameCtrl.getPlayers(); @@ -82,7 +82,7 @@ public class PlayersDisplay extends Sprite label.y = y; addChild(label); y += Math.max(label.textHeight, iconH) + pad; - maxWidth = Math.max(maxWidth, iconW + label.textWidth); + maxWidth = Math.max(maxWidth, iconW + label.textWidth + TEXTWIDTH_ADD); _playerLabels.push(label); } @@ -172,5 +172,9 @@ public class PlayersDisplay extends Sprite /** An array of labels, one for each player name. */ protected var _playerLabels :Array = []; + + /** These are fucking ridiculous. */ + protected static const TEXTWIDTH_ADD :int = 5; + protected static const TEXTHEIGHT_ADD :int = 4; } }