SerializableEntityEditor layout tweaking

This commit is contained in:
Joonas Rikkonen
2017-11-14 18:59:12 +02:00
parent b3769b383a
commit 65b1e8c83a
3 changed files with 41 additions and 7 deletions
@@ -87,7 +87,14 @@ namespace Barotrauma
}
}
SetDimensions(new Point(Rect.Width, children.Last().Rect.Bottom - Rect.Y + 10), false);
if (children.Count > 0)
{
SetDimensions(new Point(Rect.Width, children.Last().Rect.Bottom - Rect.Y + 10), false);
}
else
{
SetDimensions(new Point(Rect.Width, 0), false);
}
}
public void AddCustomContent(GUIComponent component, int childIndex)
@@ -228,7 +235,7 @@ namespace Barotrauma
propertyBox.Text = value;
propertyBox.OnEnterPressed = (textBox, text) =>
{
if (property.TrySetValue(value))
if (property.TrySetValue(text))
{
TrySendNetworkUpdate(entity, property);
}