remove unused Action from DrawPanel
This commit is contained in:
@@ -31,7 +31,7 @@ namespace OpenRA.Widgets
|
||||
return;
|
||||
}
|
||||
|
||||
WidgetUtils.DrawPanel(Background, Bounds, null);
|
||||
WidgetUtils.DrawPanel(Background, Bounds);
|
||||
base.Draw(world);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace OpenRA.Widgets
|
||||
}
|
||||
|
||||
var stateOffset = (Depressed) ? new int2(VisualHeight, VisualHeight) : new int2(0, 0);
|
||||
WidgetUtils.DrawPanel(Depressed ? "dialog3" : "dialog2", Bounds, null);
|
||||
WidgetUtils.DrawPanel(Depressed ? "dialog3" : "dialog2", Bounds);
|
||||
|
||||
Game.chrome.renderer.BoldFont.DrawText(Text,
|
||||
new int2(Bounds.X + Bounds.Width / 2, Bounds.Y + Bounds.Height / 2)
|
||||
|
||||
@@ -36,10 +36,8 @@ namespace OpenRA.Widgets
|
||||
return;
|
||||
}
|
||||
|
||||
WidgetUtils.DrawPanel("dialog3",
|
||||
new Rectangle(Bounds.Location,
|
||||
new Size(Bounds.Height, Bounds.Height)),
|
||||
() => { });
|
||||
WidgetUtils.DrawPanel("dialog3", new Rectangle(Bounds.Location,
|
||||
new Size(Bounds.Height, Bounds.Height)));
|
||||
|
||||
Game.chrome.renderer.BoldFont.DrawText(Text,
|
||||
new float2(Bounds.Left + Bounds.Height * 2, Bounds.Top), Color.White);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace OpenRA.Widgets
|
||||
(Game.viewport.Width - size.X - 40) / 2,
|
||||
(Game.viewport.Height - size.Y - 10) / 2,
|
||||
size.X + 40,
|
||||
size.Y + 13), null);
|
||||
size.Y + 13));
|
||||
|
||||
Game.chrome.renderer.TitleFont.DrawText(s,
|
||||
new float2((Game.viewport.Width - size.X) / 2,
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace OpenRA.Widgets
|
||||
Game.chrome.renderer.WorldSpriteRenderer.DrawSprite(s,pos,"chrome");
|
||||
}
|
||||
|
||||
public static void DrawPanel(string collection, Rectangle Bounds, Action a)
|
||||
public static void DrawPanel(string collection, Rectangle Bounds)
|
||||
{
|
||||
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();
|
||||
@@ -82,8 +82,6 @@ namespace OpenRA.Widgets
|
||||
DrawRGBA(ss[5], new float2(Bounds.Right - ss[5].size.X, Bounds.Top));
|
||||
DrawRGBA(ss[6], new float2(Bounds.Left, Bounds.Bottom - ss[6].size.Y));
|
||||
DrawRGBA(ss[7], new float2(Bounds.Right - ss[7].size.X, Bounds.Bottom - ss[7].size.Y));
|
||||
|
||||
if (a != null) a();
|
||||
}
|
||||
|
||||
public static void FillRectWithSprite(Rectangle r, Sprite s)
|
||||
|
||||
Reference in New Issue
Block a user