This commit is contained in:
Regalis
2015-11-22 00:40:37 +02:00
parent 91fa25ecd2
commit 1eaf22d3d0
14 changed files with 100 additions and 22 deletions

View File

@@ -205,7 +205,7 @@ namespace Barotrauma
private Vector2 MeasureText(string text)
{
if (string.IsNullOrEmpty(text) || Font==null) return Vector2.Zero;
if (Font==null) return Vector2.Zero;
Vector2 size = Vector2.Zero;
while (size == Vector2.Zero)

View File

@@ -196,9 +196,15 @@ namespace Barotrauma
{
string input = Text;
Text = "";
OnEnterPressed(this, input);
OnEnterPressed(this, input);
}
#if LINUX
else if (PlayerInput.KeyHit(Keys.Back) && Text.Length>0)
{
Text = Text.Substring(0, Text.Length-1);
}
#endif
}
textBlock.Update(deltaTime);