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:
@@ -44,12 +44,17 @@ namespace Content.Client.State
|
|||||||
_characterSetup = new CharacterSetupGui(_entityManager, _resourceCache, _preferencesManager,
|
_characterSetup = new CharacterSetupGui(_entityManager, _resourceCache, _preferencesManager,
|
||||||
_prototypeManager);
|
_prototypeManager);
|
||||||
LayoutContainer.SetAnchorPreset(_characterSetup, LayoutContainer.LayoutPreset.Wide);
|
LayoutContainer.SetAnchorPreset(_characterSetup, LayoutContainer.LayoutPreset.Wide);
|
||||||
|
|
||||||
_characterSetup.CloseButton.OnPressed += args =>
|
_characterSetup.CloseButton.OnPressed += args =>
|
||||||
|
{
|
||||||
|
_userInterfaceManager.StateRoot.AddChild(_lobby);
|
||||||
|
_userInterfaceManager.StateRoot.RemoveChild(_characterSetup);
|
||||||
|
};
|
||||||
|
|
||||||
|
_characterSetup.SaveButton.OnPressed += args =>
|
||||||
{
|
{
|
||||||
_characterSetup.Save();
|
_characterSetup.Save();
|
||||||
_lobby.CharacterPreview.UpdateUI();
|
_lobby.CharacterPreview.UpdateUI();
|
||||||
_userInterfaceManager.StateRoot.AddChild(_lobby);
|
|
||||||
_userInterfaceManager.StateRoot.RemoveChild(_characterSetup);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_lobby = new LobbyGui(_entityManager, _resourceCache, _preferencesManager);
|
_lobby = new LobbyGui(_entityManager, _resourceCache, _preferencesManager);
|
||||||
@@ -92,7 +97,7 @@ namespace Content.Client.State
|
|||||||
};
|
};
|
||||||
|
|
||||||
_lobby.LeaveButton.OnPressed += args => _console.ProcessCommand("disconnect");
|
_lobby.LeaveButton.OnPressed += args => _console.ProcessCommand("disconnect");
|
||||||
_lobby.CreditsButton.OnPressed += args => new CreditsWindow().Open();
|
_lobby.OptionsButton.OnPressed += args => new OptionsMenu().Open();
|
||||||
|
|
||||||
UpdatePlayerList();
|
UpdatePlayerList();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Content.Client
|
namespace Content.Client
|
||||||
{
|
{
|
||||||
public static class UILinks
|
public static class UILinks
|
||||||
{
|
{
|
||||||
@@ -6,6 +6,7 @@ namespace Content.Client
|
|||||||
public const string Patreon = "https://www.patreon.com/spacestation14";
|
public const string Patreon = "https://www.patreon.com/spacestation14";
|
||||||
|
|
||||||
public const string Discord = "https://discordapp.com/invite/t2jac3p";
|
public const string Discord = "https://discordapp.com/invite/t2jac3p";
|
||||||
|
public const string BugReport = "https://github.com/space-wizards/space-station-14/issues/new/choose";
|
||||||
public const string Website = "https://spacestation14.io";
|
public const string Website = "https://spacestation14.io";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ namespace Content.Client.UserInterface
|
|||||||
private readonly HumanoidProfileEditor _humanoidProfileEditor;
|
private readonly HumanoidProfileEditor _humanoidProfileEditor;
|
||||||
private readonly IClientPreferencesManager _preferencesManager;
|
private readonly IClientPreferencesManager _preferencesManager;
|
||||||
public readonly Button CloseButton;
|
public readonly Button CloseButton;
|
||||||
|
public readonly Button SaveButton;
|
||||||
|
|
||||||
public CharacterSetupGui(IEntityManager entityManager,
|
public CharacterSetupGui(IEntityManager entityManager,
|
||||||
IResourceCache resourceCache,
|
IResourceCache resourceCache,
|
||||||
@@ -64,13 +65,6 @@ namespace Content.Client.UserInterface
|
|||||||
|
|
||||||
margin.AddChild(vBox);
|
margin.AddChild(vBox);
|
||||||
|
|
||||||
CloseButton = new Button
|
|
||||||
{
|
|
||||||
SizeFlagsHorizontal = SizeFlags.Expand | SizeFlags.ShrinkEnd,
|
|
||||||
Text = Loc.GetString("Save and close"),
|
|
||||||
StyleClasses = {StyleNano.StyleClassButtonBig}
|
|
||||||
};
|
|
||||||
|
|
||||||
var topHBox = new HBoxContainer
|
var topHBox = new HBoxContainer
|
||||||
{
|
{
|
||||||
CustomMinimumSize = (0, 40),
|
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},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ namespace Content.Client.UserInterface
|
|||||||
private readonly Button _saveButton;
|
private readonly Button _saveButton;
|
||||||
private readonly Button _sexFemaleButton;
|
private readonly Button _sexFemaleButton;
|
||||||
private readonly Button _sexMaleButton;
|
private readonly Button _sexMaleButton;
|
||||||
|
private readonly Button _sexClassifiedButton;
|
||||||
private readonly HairStylePicker _hairPicker;
|
private readonly HairStylePicker _hairPicker;
|
||||||
private readonly FacialHairStylePicker _facialHairPicker;
|
private readonly FacialHairStylePicker _facialHairPicker;
|
||||||
private readonly List<JobPrioritySelector> _jobPriorities;
|
private readonly List<JobPrioritySelector> _jobPriorities;
|
||||||
@@ -162,15 +163,26 @@ namespace Content.Client.UserInterface
|
|||||||
Group = sexButtonGroup
|
Group = sexButtonGroup
|
||||||
};
|
};
|
||||||
_sexMaleButton.OnPressed += args => { SetSex(Sex.Male); };
|
_sexMaleButton.OnPressed += args => { SetSex(Sex.Male); };
|
||||||
|
|
||||||
_sexFemaleButton = new Button
|
_sexFemaleButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Female"),
|
Text = Loc.GetString("Female"),
|
||||||
Group = sexButtonGroup
|
Group = sexButtonGroup
|
||||||
};
|
};
|
||||||
_sexFemaleButton.OnPressed += args => { SetSex(Sex.Female); };
|
_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(sexLabel);
|
||||||
hBox.AddChild(_sexMaleButton);
|
hBox.AddChild(_sexMaleButton);
|
||||||
hBox.AddChild(_sexFemaleButton);
|
hBox.AddChild(_sexFemaleButton);
|
||||||
|
hBox.AddChild(_sexClassifiedButton);
|
||||||
panel.AddChild(hBox);
|
panel.AddChild(hBox);
|
||||||
sexAndAgeRow.AddChild(panel);
|
sexAndAgeRow.AddChild(panel);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace Content.Client.UserInterface
|
|||||||
|
|
||||||
var header = new NanoHeading
|
var header = new NanoHeading
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Character setup")
|
Text = Loc.GetString("Character")
|
||||||
};
|
};
|
||||||
|
|
||||||
CharacterSetupButton = new Button
|
CharacterSetupButton = new Button
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Content.Client.UserInterface
|
|||||||
public Label StartTime { get; }
|
public Label StartTime { get; }
|
||||||
public Button ReadyButton { get; }
|
public Button ReadyButton { get; }
|
||||||
public Button ObserveButton { get; }
|
public Button ObserveButton { get; }
|
||||||
public Button CreditsButton { get; }
|
public Button OptionsButton { get; }
|
||||||
public Button LeaveButton { get; }
|
public Button LeaveButton { get; }
|
||||||
public ChatBox Chat { get; }
|
public ChatBox Chat { get; }
|
||||||
public LobbyPlayerList OnlinePlayerList { get; }
|
public LobbyPlayerList OnlinePlayerList { get; }
|
||||||
@@ -72,8 +72,6 @@ namespace Content.Client.UserInterface
|
|||||||
{
|
{
|
||||||
Text = Loc.GetString("Lobby"),
|
Text = Loc.GetString("Lobby"),
|
||||||
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
|
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
|
||||||
/*MarginBottom = 40,
|
|
||||||
MarginLeft = 8,*/
|
|
||||||
VAlign = Label.VAlignMode.Center
|
VAlign = Label.VAlignMode.Center
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,24 +79,20 @@ namespace Content.Client.UserInterface
|
|||||||
(ServerName = new Label
|
(ServerName = new Label
|
||||||
{
|
{
|
||||||
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
|
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
|
||||||
/*MarginBottom = 40,
|
|
||||||
GrowHorizontal = GrowDirection.Both,*/
|
|
||||||
VAlign = Label.VAlignMode.Center,
|
VAlign = Label.VAlignMode.Center,
|
||||||
SizeFlagsHorizontal = SizeFlags.Expand | SizeFlags.ShrinkCenter
|
SizeFlagsHorizontal = SizeFlags.Expand | SizeFlags.ShrinkCenter
|
||||||
}),
|
}),
|
||||||
(CreditsButton = new Button
|
(OptionsButton = new Button
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
|
SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
|
||||||
Text = Loc.GetString("Credits"),
|
Text = Loc.GetString("Options"),
|
||||||
StyleClasses = {StyleNano.StyleClassButtonBig},
|
StyleClasses = {StyleNano.StyleClassButtonBig},
|
||||||
//GrowHorizontal = GrowDirection.Begin
|
|
||||||
}),
|
}),
|
||||||
(LeaveButton = new Button
|
(LeaveButton = new Button
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
|
SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
|
||||||
Text = Loc.GetString("Leave"),
|
Text = Loc.GetString("Leave"),
|
||||||
StyleClasses = {StyleNano.StyleClassButtonBig},
|
StyleClasses = {StyleNano.StyleClassButtonBig},
|
||||||
//GrowHorizontal = GrowDirection.Begin
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
@@ -23,14 +23,22 @@ namespace Content.Client.UserInterface
|
|||||||
|
|
||||||
var uriOpener = IoCManager.Resolve<IUriOpener>();
|
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);
|
discordButton.OnPressed += args => uriOpener.OpenUri(UILinks.Discord);
|
||||||
|
|
||||||
var websiteButton = new Button {Text = Loc.GetString("Website")};
|
var websiteButton = new Button {Text = Loc.GetString("Website")};
|
||||||
websiteButton.OnPressed += args => uriOpener.OpenUri(UILinks.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(discordButton);
|
||||||
buttons.AddChild(websiteButton);
|
buttons.AddChild(websiteButton);
|
||||||
|
buttons.AddChild(reportButton);
|
||||||
|
buttons.AddChild(creditsButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetInfoBlob(string markup)
|
public void SetInfoBlob(string markup)
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ namespace Content.Shared.GameObjects.Components.Mobs
|
|||||||
{
|
{
|
||||||
Sex.Female => Gender.Female,
|
Sex.Female => Gender.Female,
|
||||||
Sex.Male => Gender.Male,
|
Sex.Male => Gender.Male,
|
||||||
|
Sex.Classified => Gender.Neuter,
|
||||||
_ => Gender.Epicene,
|
_ => Gender.Epicene,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -232,7 +232,7 @@ namespace Content.Shared.Preferences
|
|||||||
}
|
}
|
||||||
|
|
||||||
public string Summary =>
|
public string Summary =>
|
||||||
$"{Name}, {Age} years old {Sex.ToString().ToLower()} human.";
|
$"{Name}, {Age} years old human. Their gender is {Sex.ToString().ToLower()}.";
|
||||||
|
|
||||||
public bool MemberwiseEquals(ICharacterProfile maybeOther)
|
public bool MemberwiseEquals(ICharacterProfile maybeOther)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
namespace Content.Shared.Preferences
|
namespace Content.Shared.Preferences
|
||||||
{
|
{
|
||||||
public enum Sex
|
public enum Sex
|
||||||
{
|
{
|
||||||
Male,
|
Male,
|
||||||
Female
|
Female,
|
||||||
|
Classified
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user