(f95283b36) Submarine preview layout changes, don't display attributes that don't have a value, GUIMessageBox layout tweaking

This commit is contained in:
Joonas Rikkonen
2019-04-05 16:13:12 +03:00
parent f91e28c248
commit 57e5a969ba
4 changed files with 102 additions and 54 deletions
@@ -69,8 +69,8 @@ namespace Barotrauma
GUI.Style.Apply(Text, "", this);
}
var buttonContainer = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.15f), Content.RectTransform, Anchor.BottomCenter),
isHorizontal: true, childAnchor: Anchor.BottomLeft)
var buttonContainer = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.15f), Content.RectTransform, Anchor.BottomCenter, maxSize: new Point(1000, 50)),
isHorizontal: true, childAnchor: buttons.Length > 1 ? Anchor.BottomLeft : Anchor.Center)
{
AbsoluteSpacing = 5,
IgnoreLayoutGroups = true
@@ -79,7 +79,7 @@ namespace Barotrauma
Buttons = new List<GUIButton>(buttons.Length);
for (int i = 0; i < buttons.Length; i++)
{
var button = new GUIButton(new RectTransform(new Vector2(Math.Min(0.9f / buttons.Length, 0.5f), 1.0f), buttonContainer.RectTransform, maxSize: new Point(300, 30)), buttons[i]);
var button = new GUIButton(new RectTransform(new Vector2(Math.Min(0.9f / buttons.Length, 0.5f), 1.0f), buttonContainer.RectTransform, maxSize: new Point(300, 35)), buttons[i], style: "GUIButtonLarge");
Buttons.Add(button);
}