Overhaul the lobby faction dropdown for ra

This commit is contained in:
ScottNZ
2014-11-23 19:58:57 +13:00
parent ac090b3acd
commit 4f4c67735d
12 changed files with 185 additions and 40 deletions

View File

@@ -19,9 +19,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
var label = widget.Get<LabelWidget>("LABEL");
var font = Game.Renderer.Fonts[label.Font];
var labelWidth = font.Measure(button.TooltipText).X;
var text = button.GetTooltipText();
var labelWidth = font.Measure(text).X;
label.GetText = () => button.TooltipText;
label.GetText = () => text;
label.Bounds.Width = labelWidth;
widget.Bounds.Width = 2 * label.Bounds.X + labelWidth;