From 6ec322756735448bfacb32494d874f16677a37d2 Mon Sep 17 00:00:00 2001 From: Just-a-Unity-Dev <67359748+Just-a-Unity-Dev@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:39:21 +0800 Subject: [PATCH] CTV: Lobby screen (#219) * Redesigned lobby screen * New font --- Content.Client/Access/AccessOverlay.cs | 2 +- .../Administration/AdminNameOverlay.cs | 2 +- .../SpawnExplosion/ExplosionDebugOverlay.cs | 2 +- Content.Client/Fluids/PuddleOverlay.cs | 2 +- Content.Client/Lobby/LobbyState.cs | 19 ++- Content.Client/Lobby/UI/LobbyGui.xaml | 126 ++++++++++++------ Content.Client/NPC/HTN/HTNOverlay.cs | 2 +- Content.Client/NPC/PathfindingSystem.cs | 2 +- .../NodeContainer/NodeVisualizationOverlay.cs | 2 +- Content.Client/Popups/PopupOverlay.cs | 6 +- .../Overlays/RadiationDebugOverlay.cs | 2 +- Content.Client/Stylesheets/StyleBase.cs | 6 +- Content.Client/Stylesheets/StyleNano.cs | 13 +- Content.Client/Stylesheets/StyleSpace.cs | 6 +- .../Systems/Bwoink/AHelpUIController.cs | 3 +- .../Systems/Chat/Widgets/ChatBox.xaml | 2 +- .../Systems/Chat/Widgets/ChatBox.xaml.cs | 1 + .../_FTL/FtlPoints/StarmapControl.cs | 2 +- Resources/Fonts/B612_Mono/B612_Mono-Bold.ttf | Bin 0 -> 135904 bytes .../Fonts/B612_Mono/B612_Mono-BoldItalic.ttf | Bin 0 -> 121732 bytes .../Fonts/B612_Mono/B612_Mono-Italic.ttf | Bin 0 -> 118888 bytes .../Fonts/B612_Mono/B612_Mono-Regular.ttf | Bin 0 -> 136712 bytes Resources/Fonts/B612_Mono/OFL.txt | 93 +++++++++++++ Resources/Locale/en-US/lobby/lobby-gui.ftl | 2 + Resources/Textures/Interface/Nano/button.svg | 56 ++++---- .../Interface/Nano/button.svg.96dpi.png | Bin 237 -> 182 bytes 26 files changed, 261 insertions(+), 90 deletions(-) create mode 100644 Resources/Fonts/B612_Mono/B612_Mono-Bold.ttf create mode 100644 Resources/Fonts/B612_Mono/B612_Mono-BoldItalic.ttf create mode 100644 Resources/Fonts/B612_Mono/B612_Mono-Italic.ttf create mode 100644 Resources/Fonts/B612_Mono/B612_Mono-Regular.ttf create mode 100644 Resources/Fonts/B612_Mono/OFL.txt diff --git a/Content.Client/Access/AccessOverlay.cs b/Content.Client/Access/AccessOverlay.cs index 3cb90158f3..10025705a2 100644 --- a/Content.Client/Access/AccessOverlay.cs +++ b/Content.Client/Access/AccessOverlay.cs @@ -22,7 +22,7 @@ public AccessOverlay(IEntityManager entManager, IResourceCache cache, EntityLook _lookup = lookup; _xform = xform; - _font = cache.GetFont("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf", 12); + _font = cache.GetFont("/Fonts/B612_Mono/B612_Mono-Regular.ttf", 12); } protected override void Draw(in OverlayDrawArgs args) diff --git a/Content.Client/Administration/AdminNameOverlay.cs b/Content.Client/Administration/AdminNameOverlay.cs index 2f17a49fed..31484ce245 100644 --- a/Content.Client/Administration/AdminNameOverlay.cs +++ b/Content.Client/Administration/AdminNameOverlay.cs @@ -24,7 +24,7 @@ public AdminNameOverlay(AdminSystem system, IEntityManager entityManager, IEyeMa _eyeManager = eyeManager; _entityLookup = entityLookup; ZIndex = 200; - _font = new VectorFont(resourceCache.GetResource("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 10); + _font = new VectorFont(resourceCache.GetResource("/Fonts/B612_Mono/B612_Mono-Regular.ttf"), 10); } public override OverlaySpace Space => OverlaySpace.ScreenSpace; diff --git a/Content.Client/Administration/UI/SpawnExplosion/ExplosionDebugOverlay.cs b/Content.Client/Administration/UI/SpawnExplosion/ExplosionDebugOverlay.cs index f6ecbfaeca..1e09253eff 100644 --- a/Content.Client/Administration/UI/SpawnExplosion/ExplosionDebugOverlay.cs +++ b/Content.Client/Administration/UI/SpawnExplosion/ExplosionDebugOverlay.cs @@ -35,7 +35,7 @@ public ExplosionDebugOverlay() IoCManager.InjectDependencies(this); var cache = IoCManager.Resolve(); - _font = new VectorFont(cache.GetResource("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 8); + _font = new VectorFont(cache.GetResource("/Fonts/B612_Mono/B612_Mono-Regular.ttf"), 8); } protected override void Draw(in OverlayDrawArgs args) diff --git a/Content.Client/Fluids/PuddleOverlay.cs b/Content.Client/Fluids/PuddleOverlay.cs index 2fbf11675e..9ca38d9744 100644 --- a/Content.Client/Fluids/PuddleOverlay.cs +++ b/Content.Client/Fluids/PuddleOverlay.cs @@ -28,7 +28,7 @@ public PuddleOverlay() IoCManager.InjectDependencies(this); _debugOverlaySystem = _entitySystemManager.GetEntitySystem(); var cache = IoCManager.Resolve(); - _font = new VectorFont(cache.GetResource("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 8); + _font = new VectorFont(cache.GetResource("/Fonts/B612_Mono/B612_Mono-Regular.ttf"), 8); } protected override void Draw(in OverlayDrawArgs args) diff --git a/Content.Client/Lobby/LobbyState.cs b/Content.Client/Lobby/LobbyState.cs index 457163a5b5..4df3ff46ac 100644 --- a/Content.Client/Lobby/LobbyState.cs +++ b/Content.Client/Lobby/LobbyState.cs @@ -8,6 +8,7 @@ using Content.Client.Voting; using Robust.Client; using Robust.Client.Console; +using Robust.Client.Graphics; using Robust.Client.ResourceManagement; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; @@ -66,16 +67,17 @@ protected override void Startup() _characterSetup.SaveButton.OnPressed += _ => { _characterSetup.Save(); - _lobby.CharacterPreview.UpdateUI(); + // _lobby.CharacterPreview.UpdateUI(); }; LayoutContainer.SetAnchorPreset(_lobby, LayoutContainer.LayoutPreset.Wide); _lobby.ServerName.Text = _baseClient.GameInfo?.ServerName; //The eye of refactor gazes upon you... UpdateLobbyUi(); - _lobby.CharacterPreview.CharacterSetupButton.OnPressed += OnSetupPressed; + _lobby!.SetupCharacterButton.OnPressed += OnSetupPressed; _lobby.ReadyButton.OnPressed += OnReadyPressed; _lobby.ReadyButton.OnToggled += OnReadyToggled; + _lobby.ToggleMenu.OnPressed += OnMenuPressed; _gameTicker.InfoBlobUpdated += UpdateLobbyUi; _gameTicker.LobbyStatusUpdated += LobbyStatusUpdated; @@ -83,7 +85,7 @@ protected override void Startup() _preferencesManager.OnServerDataLoaded += PreferencesDataLoaded; - _lobby.CharacterPreview.UpdateUI(); + // _lobby.CharacterPreview.UpdateUI(); } protected override void Shutdown() @@ -96,9 +98,11 @@ protected override void Shutdown() _voteManager.ClearPopupContainer(); - _lobby!.CharacterPreview.CharacterSetupButton.OnPressed -= OnSetupPressed; + // _lobby!.CharacterPreview.CharacterSetupButton.OnPressed -= OnSetupPressed; + _lobby!.SetupCharacterButton.OnPressed -= OnSetupPressed; _lobby!.ReadyButton.OnPressed -= OnReadyPressed; _lobby!.ReadyButton.OnToggled -= OnReadyToggled; + _lobby.ToggleMenu.OnPressed -= OnMenuPressed; _lobby = null; @@ -110,7 +114,7 @@ protected override void Shutdown() private void PreferencesDataLoaded() { - _lobby?.CharacterPreview.UpdateUI(); + // _lobby?.CharacterPreview.UpdateUI(); } private void OnSetupPressed(BaseButton.ButtonEventArgs args) @@ -129,6 +133,11 @@ private void OnReadyPressed(BaseButton.ButtonEventArgs args) new LateJoinGui().OpenCentered(); } + private void OnMenuPressed(BaseButton.ButtonEventArgs args) + { + _lobby!.CenterPanel.Visible = !_lobby.CenterPanel.Visible; + } + private void OnReadyToggled(BaseButton.ButtonToggledEventArgs args) { SetReady(args.Pressed); diff --git a/Content.Client/Lobby/UI/LobbyGui.xaml b/Content.Client/Lobby/UI/LobbyGui.xaml index c3bd0da642..5fe261a7c9 100644 --- a/Content.Client/Lobby/UI/LobbyGui.xaml +++ b/Content.Client/Lobby/UI/LobbyGui.xaml @@ -8,7 +8,8 @@ xmlns:style="clr-namespace:Content.Client.Stylesheets" xmlns:lobbyUi="clr-namespace:Content.Client.Lobby.UI" xmlns:info="clr-namespace:Content.Client.Info" - xmlns:widgets="clr-namespace:Content.Client.UserInterface.Systems.Chat.Widgets"> + xmlns:widgets="clr-namespace:Content.Client.UserInterface.Systems.Chat.Widgets" + xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"> @@ -17,40 +18,96 @@ + - - - - - - -