UI layout tweaks

This commit is contained in:
Regalis
2017-04-20 17:39:32 +03:00
parent 9a5777183f
commit 499284dc91
9 changed files with 45 additions and 41 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ namespace Barotrauma
public void AddItem(string text, object userData = null)
{
GUITextBlock textBlock = new GUITextBlock(new Rectangle(0,0,0,20), text, "ListBoxElement", listBox);
GUITextBlock textBlock = new GUITextBlock(new Rectangle(0,0,0,20), text, "ListBoxElement", Alignment.TopLeft, Alignment.CenterLeft, listBox);
textBlock.UserData = userData;
}
+2 -1
View File
@@ -230,7 +230,6 @@ namespace Barotrauma
state = ComponentState.None;
}
textBlock.State = state;
if (CaretEnabled)
{
@@ -240,6 +239,7 @@ namespace Barotrauma
if (keyboardDispatcher.Subscriber == this)
{
state = ComponentState.Selected;
Character.DisableControls = true;
if (OnEnterPressed != null && PlayerInput.KeyHit(Keys.Enter))
{
@@ -256,6 +256,7 @@ namespace Barotrauma
}
textBlock.State = state;
textBlock.Update(deltaTime);
}