Slight changes to lobby screen. (#2622)

* Initial

* More

* Pissed in a cup

* Cleansup some gunk I accidently committed

* More fuckups

* Added third gender option

* Applied review

* Fixed changed storage

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Swept
2020-12-02 08:45:07 +00:00
committed by GitHub
parent 45c45af3e3
commit a00d042dbe
12 changed files with 57 additions and 30 deletions

View File

@@ -27,6 +27,7 @@ namespace Content.Client.UserInterface
private readonly HumanoidProfileEditor _humanoidProfileEditor;
private readonly IClientPreferencesManager _preferencesManager;
public readonly Button CloseButton;
public readonly Button SaveButton;
public CharacterSetupGui(IEntityManager entityManager,
IResourceCache resourceCache,
@@ -64,13 +65,6 @@ namespace Content.Client.UserInterface
margin.AddChild(vBox);
CloseButton = new Button
{
SizeFlagsHorizontal = SizeFlags.Expand | SizeFlags.ShrinkEnd,
Text = Loc.GetString("Save and close"),
StyleClasses = {StyleNano.StyleClassButtonBig}
};
var topHBox = new HBoxContainer
{
CustomMinimumSize = (0, 40),
@@ -90,7 +84,18 @@ namespace Content.Client.UserInterface
}
}
},
CloseButton
(SaveButton = new Button
{
SizeFlagsHorizontal = SizeFlags.Expand | SizeFlags.ShrinkEnd,
Text = Loc.GetString("Save"),
StyleClasses = {StyleNano.StyleClassButtonBig},
}),
(CloseButton = new Button
{
SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
Text = Loc.GetString("Close"),
StyleClasses = {StyleNano.StyleClassButtonBig},
})
}
};

View File

@@ -40,6 +40,7 @@ namespace Content.Client.UserInterface
private readonly Button _saveButton;
private readonly Button _sexFemaleButton;
private readonly Button _sexMaleButton;
private readonly Button _sexClassifiedButton;
private readonly HairStylePicker _hairPicker;
private readonly FacialHairStylePicker _facialHairPicker;
private readonly List<JobPrioritySelector> _jobPriorities;
@@ -162,15 +163,26 @@ namespace Content.Client.UserInterface
Group = sexButtonGroup
};
_sexMaleButton.OnPressed += args => { SetSex(Sex.Male); };
_sexFemaleButton = new Button
{
Text = Loc.GetString("Female"),
Group = sexButtonGroup
};
_sexFemaleButton.OnPressed += args => { SetSex(Sex.Female); };
_sexClassifiedButton = new Button
{
/* DUR WHAT IF I PUT ATTACK HELICOPTER HERE DUR HUR AHUHRUHWUIDHAEILUBFOWEL(*&RFH#W*(OBFD&*/
Text = Loc.GetString("Classified"),
Group = sexButtonGroup
};
_sexClassifiedButton.OnPressed += args => { SetSex(Sex.Classified); };
hBox.AddChild(sexLabel);
hBox.AddChild(_sexMaleButton);
hBox.AddChild(_sexFemaleButton);
hBox.AddChild(_sexClassifiedButton);
panel.AddChild(hBox);
sexAndAgeRow.AddChild(panel);
}

View File

@@ -34,7 +34,7 @@ namespace Content.Client.UserInterface
var header = new NanoHeading
{
Text = Loc.GetString("Character setup")
Text = Loc.GetString("Character")
};
CharacterSetupButton = new Button

View File

@@ -18,7 +18,7 @@ namespace Content.Client.UserInterface
public Label StartTime { get; }
public Button ReadyButton { get; }
public Button ObserveButton { get; }
public Button CreditsButton { get; }
public Button OptionsButton { get; }
public Button LeaveButton { get; }
public ChatBox Chat { get; }
public LobbyPlayerList OnlinePlayerList { get; }
@@ -72,8 +72,6 @@ namespace Content.Client.UserInterface
{
Text = Loc.GetString("Lobby"),
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
/*MarginBottom = 40,
MarginLeft = 8,*/
VAlign = Label.VAlignMode.Center
}
}
@@ -81,24 +79,20 @@ namespace Content.Client.UserInterface
(ServerName = new Label
{
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
/*MarginBottom = 40,
GrowHorizontal = GrowDirection.Both,*/
VAlign = Label.VAlignMode.Center,
SizeFlagsHorizontal = SizeFlags.Expand | SizeFlags.ShrinkCenter
}),
(CreditsButton = new Button
(OptionsButton = new Button
{
SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
Text = Loc.GetString("Credits"),
Text = Loc.GetString("Options"),
StyleClasses = {StyleNano.StyleClassButtonBig},
//GrowHorizontal = GrowDirection.Begin
}),
(LeaveButton = new Button
{
SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
Text = Loc.GetString("Leave"),
StyleClasses = {StyleNano.StyleClassButtonBig},
//GrowHorizontal = GrowDirection.Begin
})
}
};

View File

@@ -1,4 +1,4 @@
using Robust.Client.UserInterface;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
@@ -23,14 +23,22 @@ namespace Content.Client.UserInterface
var uriOpener = IoCManager.Resolve<IUriOpener>();
var discordButton = new Button {Text = Loc.GetString("Join us on Discord!")};
var discordButton = new Button {Text = Loc.GetString("Discord")};
discordButton.OnPressed += args => uriOpener.OpenUri(UILinks.Discord);
var websiteButton = new Button {Text = Loc.GetString("Website")};
websiteButton.OnPressed += args => uriOpener.OpenUri(UILinks.Website);
var reportButton = new Button { Text = Loc.GetString("Report Bugs") };
reportButton.OnPressed += args => uriOpener.OpenUri(UILinks.BugReport);
var creditsButton = new Button { Text = Loc.GetString("Credits") };
creditsButton.OnPressed += args => new CreditsWindow().Open();
buttons.AddChild(discordButton);
buttons.AddChild(websiteButton);
buttons.AddChild(reportButton);
buttons.AddChild(creditsButton);
}
public void SetInfoBlob(string markup)