(345ac3e2d) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:59:40 +03:00
parent 018f20e0f0
commit 79e38a0fa0
16 changed files with 314 additions and 146 deletions
@@ -33,6 +33,7 @@ namespace Barotrauma
public GUIMessageBox(string headerText, string text, string[] buttons, Vector2? relativeSize = null, Point? minSize = null, Alignment textAlignment = Alignment.TopLeft, string tag = "")
: base(new RectTransform(Vector2.One, GUI.Canvas, Anchor.Center), style: "")
{
//int width = (int)(DefaultWidth * GUI.Scale), height = 0;
int width = DefaultWidth, height = 0;
if (relativeSize.HasValue)
{
@@ -206,7 +206,7 @@ namespace Barotrauma
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 * 15), 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);
}
}