Adds rule button to lobby and character creation. Add IC naming warning. (#4760)

This commit is contained in:
Vera Aguilera Puerto
2021-10-03 23:48:29 +02:00
committed by GitHub
parent c8193ef393
commit 54a2b5dee0
6 changed files with 45 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using Content.Client.CharacterAppearance;
using Content.Client.Lobby.UI;
using Content.Client.Message;
using Content.Client.Stylesheets;
using Content.Shared.CharacterAppearance;
using Content.Shared.GameTicking;
@@ -107,12 +108,8 @@ namespace Content.Client.Preferences.UI
#region Randomize
var randomizePanel = HighlightedContainer();
var randomizeEverythingButton = new Button
{
Text = Loc.GetString("humanoid-profile-editor-randomize-everything-button")
};
randomizeEverythingButton.OnPressed += args => { RandomizeEverything(); };
randomizePanel.AddChild(randomizeEverythingButton);
var randomizeVbox = new BoxContainer() { Orientation = LayoutOrientation.Vertical };
randomizePanel.AddChild(randomizeVbox);
leftColumn.AddChild(randomizePanel);
#endregion Randomize
@@ -140,7 +137,27 @@ namespace Content.Client.Preferences.UI
nameHBox.AddChild(nameLabel);
nameHBox.AddChild(_nameEdit);
nameHBox.AddChild(nameRandomButton);
randomizePanel.AddChild(nameHBox);
randomizeVbox.AddChild(nameHBox);
var randomizeEverythingButton = new Button
{
HorizontalAlignment = HAlignment.Center,
HorizontalExpand = false,
MaxWidth = 256,
Text = Loc.GetString("humanoid-profile-editor-randomize-everything-button"),
};
randomizeEverythingButton.OnPressed += args => { RandomizeEverything(); };
randomizeVbox.AddChild(randomizeEverythingButton);
var warningLabel = new RichTextLabel()
{
HorizontalExpand = false,
VerticalExpand = true,
MaxWidth = 425,
HorizontalAlignment = HAlignment.Left,
};
warningLabel.SetMarkup($"[color=red]{Loc.GetString("humanoid-profile-editor-naming-rules-warning")}[/color]");
randomizeVbox.AddChild(warningLabel);
#endregion Name