fix trailing whitespace everywhere
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Widgets
|
||||
{
|
||||
public int Percentage = 0;
|
||||
public bool Indeterminate = false;
|
||||
|
||||
|
||||
// Indeterminant bar properties
|
||||
float offset = 0f;
|
||||
float tickStep = 0.04f;
|
||||
@@ -28,20 +28,20 @@ namespace OpenRA.Widgets
|
||||
{
|
||||
Percentage = widget.Percentage;
|
||||
}
|
||||
|
||||
|
||||
public override void Draw()
|
||||
{
|
||||
var rb = RenderBounds;
|
||||
WidgetUtils.DrawPanel("progressbar-bg", rb);
|
||||
|
||||
Rectangle barRect = Indeterminate ?
|
||||
new Rectangle(rb.X + 2 + (int)(0.75*offset*(rb.Width - 4)), rb.Y + 2, (rb.Width - 4) / 4, rb.Height - 4) :
|
||||
|
||||
Rectangle barRect = Indeterminate ?
|
||||
new Rectangle(rb.X + 2 + (int)(0.75*offset*(rb.Width - 4)), rb.Y + 2, (rb.Width - 4) / 4, rb.Height - 4) :
|
||||
new Rectangle(rb.X + 2, rb.Y + 2, Percentage * (rb.Width - 4) / 100, rb.Height - 4);
|
||||
|
||||
|
||||
if (barRect.Width > 0)
|
||||
WidgetUtils.DrawPanel("progressbar-thumb", barRect);
|
||||
}
|
||||
|
||||
|
||||
public override void Tick()
|
||||
{
|
||||
if (Indeterminate)
|
||||
@@ -52,13 +52,13 @@ namespace OpenRA.Widgets
|
||||
tickStep *= -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SetIndeterminate(bool value)
|
||||
{
|
||||
Indeterminate = value;
|
||||
offset = 0f;
|
||||
}
|
||||
|
||||
|
||||
public override Widget Clone() { return new ProgressBarWidget(this); }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user