"Awesome tooltips" for special powers

This commit is contained in:
Paul Chote
2010-04-10 21:35:10 +12:00
committed by Chris Forbes
parent ca725ae505
commit ba857835b4
4 changed files with 111 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Drawing;
using System.Linq;
using OpenRA.FileFormats;
@@ -57,7 +57,7 @@ namespace OpenRA.Graphics
public int2 Measure(string text)
{
return new int2((int)text.Split( '\n' ).Max( s => s.Sum(a => glyphs[a].Advance)), size);
return new int2((int)text.Split( '\n' ).Max( s => s.Sum(a => glyphs[a].Advance)), text.Split('\n').Count()*size);
}
Cache<char, GlyphInfo> glyphs;