(a17abe3fa) Remove a not so useful loop from a method, which might be used often.

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:25:12 +03:00
parent 52d3737416
commit e500ba2bdf
28 changed files with 400 additions and 244 deletions
@@ -203,12 +203,10 @@ namespace Barotrauma
{
string wrappedTip = ToolBox.WrapText(selectedTip, GameMain.GraphicsWidth * 0.5f, GUI.Font);
string[] lines = wrappedTip.Split('\n');
float lineHeight = GUI.Font.MeasureString(selectedTip).Y;
for (int i = 0; i < lines.Length; i++)
{
GUI.Font.DrawString(spriteBatch, lines[i],
new Vector2(GameMain.GraphicsWidth / 2.0f - GUI.Font.MeasureString(lines[i]).X / 2.0f, GameMain.GraphicsHeight * 0.78f + i * lineHeight), Color.White);
new Vector2(GameMain.GraphicsWidth / 2.0f - GUI.Font.MeasureString(lines[i]).X / 2.0f, GameMain.GraphicsHeight * 0.78f + i * (15 * GUI.Scale)), Color.White);
}
}