Cleanup with resharper (mostly removing redundancies & using collection.Length/Count properties instead of the Count method)

This commit is contained in:
Regalis
2016-10-31 20:35:04 +02:00
parent 5cc605bc01
commit eb2c51c2f1
46 changed files with 93 additions and 200 deletions
-10
View File
@@ -169,26 +169,16 @@ namespace Barotrauma
private void MoveButton()
{
//if (!enabled) return false;
//if (barSize == 1.0f) return false;
int newX = bar.Rect.X - frame.Rect.X, newY = bar.Rect.Y - frame.Rect.Y;
float moveAmount;
if (isHorizontal)
{
moveAmount = PlayerInput.MouseSpeed.X;
barScroll += moveAmount / (frame.Rect.Width - bar.Rect.Width);
//newX = Math.Min(Math.Max(newX + moveAmount, 0), frame.Rect.Width - bar.Rect.Width);
//barScroll = (float)newX / ((float)frame.Rect.Width - (float)bar.Rect.Width);
}
else
{
moveAmount = PlayerInput.MouseSpeed.Y;
barScroll += moveAmount / (frame.Rect.Height - bar.Rect.Height);
//newY = Math.Min(Math.Max(newY+moveAmount, 0), frame.Rect.Height - bar.Rect.Height);
//barScroll = (float)newY / ((float)frame.Rect.Height - (float)bar.Rect.Height);
}
BarScroll = barScroll;