Fix StyleCop warnings in OpenRA.Game

This commit is contained in:
Hellhake
2015-01-01 23:04:18 +01:00
parent e9989496c4
commit 5a97a4b63b
119 changed files with 547 additions and 529 deletions

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Widgets
public class SliderWidget : Widget
{
public Func<bool> IsDisabled = () => false;
public event Action<float> OnChange = _ => {};
public event Action<float> OnChange = _ => { };
public int Ticks = 0;
public int TrackHeight = 5;
public string Thumb = "slider-thumb";
@@ -59,7 +59,7 @@ namespace OpenRA.Widgets
if (mi.Event == MouseInputEvent.Down && !TakeMouseFocus(mi)) return false;
if (!HasMouseFocus) return false;
switch(mi.Event)
switch (mi.Event)
{
case MouseInputEvent.Up:
isMoving = false;
@@ -95,7 +95,7 @@ namespace OpenRA.Widgets
var rb = RenderBounds;
var width = rb.Height;
var height = rb.Height;
var origin = (int)(rb.X + thumbPos - width/2f);
var origin = (int)(rb.X + thumbPos - width / 2f);
return new Rectangle(origin, rb.Y, width, height);
}
}
@@ -132,5 +132,4 @@ namespace OpenRA.Widgets
ButtonWidget.DrawBackground(Thumb, tr, IsDisabled(), isMoving, thumbHover, false);
}
}
}
}