diff --git a/Content.Client/Chat/ChatBox.cs b/Content.Client/Chat/ChatBox.cs index 8e756d59ad..a081ed59eb 100644 --- a/Content.Client/Chat/ChatBox.cs +++ b/Content.Client/Chat/ChatBox.cs @@ -11,8 +11,6 @@ namespace Content.Client.Chat { public class ChatBox : PanelContainer { - protected override ResourcePath ScenePath => new ResourcePath("/Scenes/ChatBox/ChatBox.tscn"); - public delegate void TextSubmitHandler(ChatBox chatBox, string text); private const int MaxLinePixelLength = 500; @@ -43,19 +41,27 @@ namespace Content.Client.Chat { base.Initialize(); - Input = GetChild("VBoxContainer/Input"); + MarginLeft = -475.0f; + MarginTop = 10.0f; + MarginRight = -10.0f; + MarginBottom = 185.0f; + + AnchorLeft = 1.0f; + AnchorRight = 1.0f; + + var vBox = new VBoxContainer("VBoxContainer"); + + contents = new OutputPanel {SizeFlagsVertical = SizeFlags.FillExpand}; + vBox.AddChild(contents); + + Input = new LineEdit("Input"); Input.OnKeyDown += InputKeyDown; Input.OnTextEntered += Input_OnTextEntered; - GetChild("VBoxContainer/Contents").Dispose(); + vBox.AddChild(Input); - contents = new OutputPanel - { - SizeFlagsVertical = SizeFlags.FillExpand, - }; - GetChild("VBoxContainer").AddChild(contents); - contents.SetPositionInParent(0); + AddChild(vBox); - PanelOverride = new StyleBoxFlat {BackgroundColor = Color.Gray.WithAlpha(0.5f)}; + PanelOverride = new StyleBoxFlat { BackgroundColor = Color.Gray.WithAlpha(0.5f) }; } protected override void MouseDown(GUIMouseButtonEventArgs e) diff --git a/Content.Client/Construction/ConstructionButton.cs b/Content.Client/Construction/ConstructionButton.cs index 14a8464f14..ecf00408f8 100644 --- a/Content.Client/Construction/ConstructionButton.cs +++ b/Content.Client/Construction/ConstructionButton.cs @@ -1,6 +1,7 @@ using Content.Client.GameObjects.Components.Construction; using Robust.Client.Interfaces.Graphics; using Robust.Client.UserInterface.Controls; +using Robust.Shared.Maths; using Robust.Shared.Utility; namespace Content.Client.Construction @@ -8,7 +9,6 @@ namespace Content.Client.Construction public class ConstructionButton : Button { private readonly IDisplayManager _displayManager; - protected override ResourcePath ScenePath => new ResourcePath("/Scenes/Construction/ConstructionButton.tscn"); public ConstructorComponent Owner { @@ -27,6 +27,12 @@ namespace Content.Client.Construction { base.Initialize(); + SetAnchorPreset(LayoutPreset.BottomRight); + MarginLeft = -110.0f; + MarginTop = -70.0f; + MarginRight = -50.0f; + MarginBottom = -50.0f; + Text = "Crafting"; OnPressed += IWasPressed; } diff --git a/Content.Client/Construction/ConstructionMenu.cs b/Content.Client/Construction/ConstructionMenu.cs index 9ac87ace82..fb0f35670d 100644 --- a/Content.Client/Construction/ConstructionMenu.cs +++ b/Content.Client/Construction/ConstructionMenu.cs @@ -27,7 +27,6 @@ namespace Content.Client.Construction { public class ConstructionMenu : SS14Window { - protected override ResourcePath ScenePath => new ResourcePath("/Scenes/Construction/ConstructionMenu.tscn"); #pragma warning disable CS0649 [Dependency] @@ -49,7 +48,11 @@ namespace Content.Client.Construction // This list is flattened in such a way that the top most deepest category is first. List FlattenedCategories; PlacementManager Placement; - public ConstructionMenu(IDisplayManager displayMan) : base(displayMan) { } + + public ConstructionMenu(IDisplayManager displayMan) : base(displayMan) + { + Size = new Vector2(500.0f, 350.0f); + } protected override void Initialize() { @@ -61,22 +64,66 @@ namespace Content.Client.Construction HideOnClose = true; Title = "Construction"; Visible = false; - var split = Contents.GetChild("HSplitContainer"); - var rightSide = split.GetChild("Guide"); - var info = rightSide.GetChild("Info"); - InfoIcon = info.GetChild("TextureRect"); - InfoLabel = info.GetChild