remove plenty of redundant junk

This commit is contained in:
Chris Forbes
2010-07-14 19:00:03 +12:00
parent 17bf4610f1
commit fed33fdb00
32 changed files with 1184 additions and 1178 deletions

View File

@@ -19,36 +19,37 @@
#endregion
using System;
using System.Drawing;
namespace OpenRA.Widgets
{
class ColorBlockWidget : Widget
{
public Func<Color> GetColor;
public ColorBlockWidget()
: base()
{
GetColor = () => Color.White;
}
public ColorBlockWidget(Widget widget)
:base(widget)
{
GetColor = (widget as ColorBlockWidget).GetColor;
}
public override Widget Clone()
{
return new ColorBlockWidget(this);
}
public override void DrawInner(World world)
{
var pos = RenderOrigin;
var paletteRect = new RectangleF(pos.X + Game.viewport.Location.X, pos.Y + Game.viewport.Location.Y, Bounds.Width, Bounds.Height);
Game.chrome.lineRenderer.FillRect(paletteRect, GetColor());
}
}
using System.Drawing;
namespace OpenRA.Widgets
{
class ColorBlockWidget : Widget
{
public Func<Color> GetColor;
public ColorBlockWidget()
: base()
{
GetColor = () => Color.White;
}
protected ColorBlockWidget(ColorBlockWidget widget)
: base(widget)
{
GetColor = widget.GetColor;
}
public override Widget Clone()
{
return new ColorBlockWidget(this);
}
public override void DrawInner(World world)
{
var pos = RenderOrigin;
var paletteRect = new RectangleF(pos.X + Game.viewport.Location.X,
pos.Y + Game.viewport.Location.Y, Bounds.Width, Bounds.Height);
Game.chrome.lineRenderer.FillRect(paletteRect, GetColor());
}
}
}