(bb5ebaee3) Minor layout improvements to New Game and Game Settings
This commit is contained in:
@@ -74,11 +74,11 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
settingsFrame = new GUIFrame(new RectTransform(new Vector2(0.8f, 0.8f), GUI.Canvas, Anchor.Center));
|
settingsFrame = new GUIFrame(new RectTransform(new Vector2(0.8f, 0.8f), GUI.Canvas, Anchor.Center));
|
||||||
|
|
||||||
var settingsFramePadding = new GUILayoutGroup(new RectTransform(new Vector2(0.95f, 0.9f), settingsFrame.RectTransform, Anchor.TopCenter) { RelativeOffset = new Vector2(0.0f, 0.05f) }) { RelativeSpacing = 0.005f, IsHorizontal = true };
|
var settingsFramePadding = new GUILayoutGroup(new RectTransform(new Vector2(0.95f, 0.9f), settingsFrame.RectTransform, Anchor.TopCenter) { RelativeOffset = new Vector2(0.0f, 0.05f) }) { RelativeSpacing = 0.01f, IsHorizontal = true };
|
||||||
|
|
||||||
/// General tab --------------------------------------------------------------
|
/// General tab --------------------------------------------------------------
|
||||||
|
|
||||||
var leftPanel = new GUILayoutGroup(new RectTransform(new Vector2(0.2f, 1.0f), settingsFramePadding.RectTransform, Anchor.TopLeft));
|
var leftPanel = new GUILayoutGroup(new RectTransform(new Vector2(0.25f, 1.0f), settingsFramePadding.RectTransform, Anchor.TopLeft));
|
||||||
|
|
||||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.05f), leftPanel.RectTransform),
|
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.05f), leftPanel.RectTransform),
|
||||||
TextManager.Get("Settings"), textAlignment: Alignment.TopLeft, font: GUI.LargeFont);
|
TextManager.Get("Settings"), textAlignment: Alignment.TopLeft, font: GUI.LargeFont);
|
||||||
@@ -139,8 +139,8 @@ namespace Barotrauma
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
var rightPanel = new GUILayoutGroup(new RectTransform(new Vector2(1.0f - leftPanel.RectTransform.RelativeSize.X, 0.95f),
|
var rightPanel = new GUILayoutGroup(new RectTransform(new Vector2(0.99f - leftPanel.RectTransform.RelativeSize.X, 0.95f),
|
||||||
settingsFramePadding.RectTransform, Anchor.TopRight));
|
settingsFramePadding.RectTransform, Anchor.TopLeft));
|
||||||
|
|
||||||
var tabButtonHolder = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.05f), rightPanel.RectTransform, Anchor.TopCenter), isHorizontal: true);
|
var tabButtonHolder = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.05f), rightPanel.RectTransform, Anchor.TopCenter), isHorizontal: true);
|
||||||
|
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ namespace Barotrauma
|
|||||||
TextManager.Get("Unknown") :
|
TextManager.Get("Unknown") :
|
||||||
TextManager.Get("DimensionsFormat").Replace("[width]", ((int)(realWorldDimensions.X)).ToString()).Replace("[height]", ((int)(realWorldDimensions.Y)).ToString());
|
TextManager.Get("DimensionsFormat").Replace("[width]", ((int)(realWorldDimensions.X)).ToString()).Replace("[height]", ((int)(realWorldDimensions.Y)).ToString());
|
||||||
|
|
||||||
var layoutGroup = new GUILayoutGroup(new RectTransform(new Vector2(0.5f, 0.5f), descriptionBox.Content.RectTransform));
|
var layoutGroup = new GUILayoutGroup(new RectTransform(new Vector2(0.5f, 0.5f), descriptionBox.Content.RectTransform) { RelativeOffset = new Vector2(0.0f, 0.05f) });
|
||||||
|
|
||||||
new GUITextBlock(new RectTransform(new Vector2(1, 0), layoutGroup.RectTransform), Name, font: GUI.LargeFont, wrap: true) { ForceUpperCase = true };
|
new GUITextBlock(new RectTransform(new Vector2(1, 0), layoutGroup.RectTransform), Name, font: GUI.LargeFont, wrap: true) { ForceUpperCase = true };
|
||||||
|
|
||||||
@@ -318,10 +318,13 @@ namespace Barotrauma
|
|||||||
font: GUI.Font, wrap: true);
|
font: GUI.Font, wrap: true);
|
||||||
|
|
||||||
new GUITextBlock(new RectTransform(new Vector2(1, 0), layoutGroup.RectTransform),
|
new GUITextBlock(new RectTransform(new Vector2(1, 0), layoutGroup.RectTransform),
|
||||||
$"{TextManager.Get("RequiredContentPackages")}: {string.Join(", ", RequiredContentPackages)}",
|
$"{TextManager.Get("RequiredContentPackages")}: {string.Join(", ", RequiredContentPackages)}",
|
||||||
font: GUI.Font, wrap: true);
|
font: GUI.Font, wrap: true);
|
||||||
|
|
||||||
new GUITextBlock(new RectTransform(new Vector2(1, 0), descriptionBox.Content.RectTransform), TextManager.Get("SaveSubDialogDescription") + ":", font: GUI.Font, wrap: true);
|
if (Description.Length != 0)
|
||||||
|
{
|
||||||
|
new GUITextBlock(new RectTransform(new Vector2(1, 0), descriptionBox.Content.RectTransform), TextManager.Get("SaveSubDialogDescription") + ":", font: GUI.Font, wrap: true) { CanBeFocused = false, ForceUpperCase = true };
|
||||||
|
}
|
||||||
|
|
||||||
new GUITextBlock(new RectTransform(new Vector2(1, 0), descriptionBox.Content.RectTransform, Anchor.TopLeft), Description, font: GUI.Font, wrap: true)
|
new GUITextBlock(new RectTransform(new Vector2(1, 0), descriptionBox.Content.RectTransform, Anchor.TopLeft), Description, font: GUI.Font, wrap: true)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace Barotrauma
|
|||||||
RelativeSpacing = 0.05f
|
RelativeSpacing = 0.05f
|
||||||
};
|
};
|
||||||
|
|
||||||
var leftColumn = new GUILayoutGroup(new RectTransform(Vector2.One, columnContainer.RectTransform))
|
var leftColumn = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.905f), columnContainer.RectTransform))
|
||||||
{
|
{
|
||||||
Stretch = true,
|
Stretch = true,
|
||||||
RelativeSpacing = 0.015f
|
RelativeSpacing = 0.015f
|
||||||
|
|||||||
Reference in New Issue
Block a user