remove some unused crap from DrawRightTooltip

This commit is contained in:
Chris Forbes
2010-04-15 19:17:06 +12:00
parent bc35249543
commit 23506a328f
2 changed files with 2 additions and 4 deletions

View File

@@ -118,7 +118,7 @@ namespace OpenRA.Widgets
else else
br += new int2(300,0); br += new int2(300,0);
WidgetUtils.DrawRightTooltip("dialog4", tl, m, br, null); WidgetUtils.DrawRightTooltip("dialog4", tl, m, br);
pos += new int2(77, 5); pos += new int2(77, 5);
Game.chrome.renderer.BoldFont.DrawText(sp.Info.Description, pos, Color.White); Game.chrome.renderer.BoldFont.DrawText(sp.Info.Description, pos, Color.White);

View File

@@ -72,7 +72,7 @@ namespace OpenRA.Widgets
} }
// todo: write this in terms of 3 DrawPanelPartial calls // todo: write this in terms of 3 DrawPanelPartial calls
public static void DrawRightTooltip(string collection, int2 tl, int2 m, int2 br, Action a) public static void DrawRightTooltip(string collection, int2 tl, int2 m, int2 br)
{ {
var images = new[] { "border-t", "border-b", "border-l", "border-r", "corner-tl", "corner-tr", "corner-bl", "corner-br", "background"}; var images = new[] { "border-t", "border-b", "border-l", "border-r", "corner-tl", "corner-tr", "corner-bl", "corner-br", "background"};
var ss = images.Select(i => ChromeProvider.GetImage(Game.chrome.renderer, collection, i)).ToArray(); var ss = images.Select(i => ChromeProvider.GetImage(Game.chrome.renderer, collection, i)).ToArray();
@@ -153,8 +153,6 @@ namespace OpenRA.Widgets
// BR corner // BR corner
DrawRGBA(ss[7], new float2(br.X - (int)ss[7].size.X, br.Y - (int)ss[7].size.Y)); DrawRGBA(ss[7], new float2(br.X - (int)ss[7].size.X, br.Y - (int)ss[7].size.Y));
if (a != null) a();
} }
static bool HasFlags(this PanelSides a, PanelSides b) { return (a & b) == b; } static bool HasFlags(this PanelSides a, PanelSides b) { return (a & b) == b; }