<commit_before>using Content.Client.Chat;
using Content.Client.Utility;
using Robust.Client.Graphics.Drawing;
using Robust.Client.Interfaces.ResourceManagement;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Localization;
using Robust.Shared.Maths;

namespace Content.Client.UserInterface
{
    internal sealed class LobbyGui : Control
    {
        public Label ServerName { get; }
        public Label StartTime { get; }
        public Button ReadyButton { get; }
        public Button ObserveButton { get; }
        public Button LeaveButton { get; }
        public ChatBox Chat { get; }
        public ItemList OnlinePlayerItemList { get; }
        public ServerInfo ServerInfo { get; }

        public LobbyGui(ILocalizationManager localization, IResourceCache resourceCache)
        {
            var panelTex = resourceCache.GetTexture("/Nano/button.svg.96dpi.png");
            var back = new StyleBoxTexture
            {
                Texture = panelTex,
                Modulate = new Color(37, 37, 42),
            };
            back.SetPatchMargin(StyleBox.Margin.All, 10);

            var panel = new Panel
            {
                PanelOverride = back
            };

            AddChild(panel);

            panel.SetAnchorAndMarginPreset(LayoutPreset.Wide);

            var vBox = new VBoxContainer {SeparationOverride = 0};

            vBox.SetAnchorAndMarginPreset(LayoutPreset.Wide);

            vBox.MarginTop = 40;

            AddChild(vBox);

            AddChild(new Label
            {
                Text = localization.GetString("Lobby"),
                StyleClasses = {NanoStyle.StyleClassLabelHeadingBigger},
                MarginBottom = 40,
                MarginLeft = 8,
                VAlign = Label.VAlignMode.Center
            });

            AddChild(ServerName = new Label
            {
                StyleClasses = {NanoStyle.StyleClassLabelHeadingBigger},
                MarginBottom = 40,
                GrowHorizontal = GrowDirection.Both,
                VAlign = Label.VAlignMode.Center
            });

            ServerName.SetAnchorAndMarginPreset(LayoutPreset.CenterTop);

            AddChild(LeaveButton = new Button
            {
                SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
                Text = localization.GetString("Leave"),
                StyleClasses = {NanoStyle.StyleClassButtonBig}
            });

            LeaveButton.SetAnchorAndMarginPreset(LayoutPreset.TopRight);

            vBox.AddChild(new Panel
            {
                PanelOverride = new StyleBoxFlat
                {
                    BackgroundColor = NanoStyle.NanoGold,
                    ContentMarginTopOverride = 2
                },
            });

            var hBox = new HBoxContainer
            {
                SizeFlagsVertical = SizeFlags.FillExpand,
                SeparationOverride = 0<commit_msg>Fix Leave button in lobby being off to the right.<commit_after>using Content.Client.Chat;
using Content.Client.Utility;
using Robust.Client.Graphics.Drawing;
using Robust.Client.Interfaces.ResourceManagement;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Localization;
using Robust.Shared.Maths;

namespace Content.Client.UserInterface
{
    internal sealed class LobbyGui : Control
    {
        public Label ServerName { get; }
        public Label StartTime { get; }
        public Button ReadyButton { get; }
        public Button ObserveButton { get; }
        public Button LeaveButton { get; }
        public ChatBox Chat { get; }
        public ItemList OnlinePlayerItemList { get; }
        public ServerInfo ServerInfo { get; }

        public LobbyGui(ILocalizationManager localization, IResourceCache resourceCache)
        {
            var panelTex = resourceCache.GetTexture("/Nano/button.svg.96dpi.png");
            var back = new StyleBoxTexture
            {
                Texture = panelTex,
                Modulate = new Color(37, 37, 42),
            };
            back.SetPatchMargin(StyleBox.Margin.All, 10);

            var panel = new Panel
            {
                PanelOverride = back
            };

            AddChild(panel);

            panel.SetAnchorAndMarginPreset(LayoutPreset.Wide);

            var vBox = new VBoxContainer {SeparationOverride = 0};

            vBox.SetAnchorAndMarginPreset(LayoutPreset.Wide);

            vBox.MarginTop = 40;

            AddChild(vBox);

            AddChild(new Label
            {
                Text = localization.GetString("Lobby"),
                StyleClasses = {NanoStyle.StyleClassLabelHeadingBigger},
                MarginBottom = 40,
                MarginLeft = 8,
                VAlign = Label.VAlignMode.Center
            });

            AddChild(ServerName = new Label
            {
                StyleClasses = {NanoStyle.StyleClassLabelHeadingBigger},
                MarginBottom = 40,
                GrowHorizontal = GrowDirection.Both,
                VAlign = Label.VAlignMode.Center
            });

            ServerName.SetAnchorAndMarginPreset(LayoutPreset.CenterTop);

            AddChild(LeaveButton = new Button
            {
                SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
                Text = localization.GetString("Leave"),
                StyleClasses = {NanoStyle.StyleClassButtonBig},
                GrowHorizontal = GrowDirection.Begin
            });

            LeaveButton.SetAnchorAndMarginPreset(LayoutPreset.TopRight);

            vBox.AddChild(new Panel
            {
                PanelOverride = new StyleBoxFlat
                {
                    BackgroundColor = NanoStyle.NanoGold,
                    ContentMarginTopOverride = 2
                },
            });

            var hBox = new HBoxContainer
            {
                SizeFlagsVertical = SizeFlags.FillExpand,
                SeparationOverride = 0
{'fraction_non_alphanumeric': 0.07278797996661102, 'fraction_numerical': 0.00667779632721202, 'mean_word_length': 1.7219445706497047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5987793', 'n_tokens_mistral': 1560, 'n_tokens_neox': 1455, 'n_words': 300}