More resharper cleanup

This commit is contained in:
Regalis11
2015-06-07 18:03:08 +03:00
parent f786cd3016
commit 34b79c85d6
62 changed files with 99 additions and 195 deletions
+4 -4
View File
@@ -48,13 +48,13 @@ namespace Subsurface
set { lifeTime = value; }
}
public GUIMessage(string text, Color color, Vector2 pos, float lifeTime)
public GUIMessage(string text, Color color, Vector2 position, float lifeTime)
{
this.coloredText = new ColoredText(text, color);
this.pos = pos;
coloredText = new ColoredText(text, color);
pos = position;
this.lifeTime = lifeTime;
this.size = GUI.font.MeasureString(text);
size = GUI.font.MeasureString(text);
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ namespace Subsurface
if (parent != null)
parent.AddChild(this);
this.textBlock = new GUITextBlock(new Rectangle(0,0,0,0), text, Color.Transparent, Color.Black, (Alignment.CenterX | Alignment.CenterY), this);
textBlock = new GUITextBlock(new Rectangle(0,0,0,0), text, Color.Transparent, Color.Black, (Alignment.CenterX | Alignment.CenterY), this);
}
+1 -3
View File
@@ -1,8 +1,5 @@
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Subsurface
{
@@ -31,6 +28,7 @@ namespace Subsurface
if (buttons == null || buttons.Length == 0)
{
DebugConsole.ThrowError("Creating a message box with no buttons isn't allowed");
return;
}
new GUITextBlock(new Rectangle(0, 5, 0, 30), header, Color.Transparent, Color.White, textAlignment, frame, true);
+1 -1
View File
@@ -119,7 +119,7 @@ namespace Subsurface
if (wrap && rect.Width>0)
{
text = text.Replace("\n"," ");
this.text = ToolBox.WrapText(this.text, rect.Width);
text = ToolBox.WrapText(text, rect.Width);
Vector2 newSize = MeasureText();