Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTV: Lobby screen #219

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content.Client/Access/AccessOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Administration/AdminNameOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public AdminNameOverlay(AdminSystem system, IEntityManager entityManager, IEyeMa
_eyeManager = eyeManager;
_entityLookup = entityLookup;
ZIndex = 200;
_font = new VectorFont(resourceCache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 10);
_font = new VectorFont(resourceCache.GetResource<FontResource>("/Fonts/B612_Mono/B612_Mono-Regular.ttf"), 10);
}

public override OverlaySpace Space => OverlaySpace.ScreenSpace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public ExplosionDebugOverlay()
IoCManager.InjectDependencies(this);

var cache = IoCManager.Resolve<IResourceCache>();
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 8);
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/B612_Mono/B612_Mono-Regular.ttf"), 8);
}

protected override void Draw(in OverlayDrawArgs args)
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Fluids/PuddleOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public PuddleOverlay()
IoCManager.InjectDependencies(this);
_debugOverlaySystem = _entitySystemManager.GetEntitySystem<PuddleDebugOverlaySystem>();
var cache = IoCManager.Resolve<IResourceCache>();
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 8);
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/B612_Mono/B612_Mono-Regular.ttf"), 8);
}

protected override void Draw(in OverlayDrawArgs args)
Expand Down
19 changes: 14 additions & 5 deletions Content.Client/Lobby/LobbyState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -66,24 +67,25 @@ 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;
_gameTicker.LobbyLateJoinStatusUpdated += LobbyLateJoinStatusUpdated;

_preferencesManager.OnServerDataLoaded += PreferencesDataLoaded;

_lobby.CharacterPreview.UpdateUI();
// _lobby.CharacterPreview.UpdateUI();
}

protected override void Shutdown()
Expand All @@ -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;

Expand All @@ -110,7 +114,7 @@ protected override void Shutdown()

private void PreferencesDataLoaded()
{
_lobby?.CharacterPreview.UpdateUI();
// _lobby?.CharacterPreview.UpdateUI();
}

private void OnSetupPressed(BaseButton.ButtonEventArgs args)
Expand All @@ -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);
Expand Down
126 changes: 88 additions & 38 deletions Content.Client/Lobby/UI/LobbyGui.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<!-- Background -->
<TextureRect Access="Public" VerticalExpand="True" HorizontalExpand="True" Name="Background"
Stretch="KeepAspectCovered" />
Expand All @@ -17,40 +18,96 @@
<SplitContainer State="Auto" HorizontalExpand="True">
<!-- LHS Controls -->
<BoxContainer Name="LeftSide" Orientation="Vertical" SeparationOverride="4" HorizontalExpand="True">

<Control Name="DefaultState" VerticalExpand="True">
<BoxContainer Name="TopLeft" Orientation="Vertical">
<!-- Left Top Panel -->
<PanelContainer StyleClasses="AngleRect" HorizontalAlignment="Left" Name="LeftSideTop"
VerticalAlignment="Top">
<BoxContainer Orientation="Vertical" HorizontalAlignment="Center" MaxWidth="800">
<info:LinkBanner Name="LinkBanner" VerticalExpand="false" HorizontalAlignment="Center"
Margin="3 3 3 3" />
<controls:StripeBack>
<BoxContainer Orientation="Horizontal" SeparationOverride="6" Margin="3 3 3 3">
<cc:UICommandButton Command="observe" Name="ObserveButton" Access="Public"
Text="{Loc 'ui-lobby-observe-button'}"
StyleClasses="ButtonBig"
WindowType="{x:Type lobbyUi:ObserveWarningWindow}" />
<Label Name="StartTime"
Access="Public"
Align="Left"
FontColorOverride="{x:Static maths:Color.DarkGray}"
StyleClasses="LabelBig" HorizontalExpand="True" />
<Button Name="ReadyButton" Access="Public" ToggleMode="True"
Text="{Loc 'ui-lobby-ready-up-button'}"
StyleClasses="ButtonBig" MinWidth="137" />
</BoxContainer>
</controls:StripeBack>
</BoxContainer>
</PanelContainer>
<!-- <PanelContainer StyleClasses="AngleRect" HorizontalAlignment="Left" Name="LeftSideTop" -->
<!-- VerticalAlignment="Top"> -->
<!-- <BoxContainer Orientation="Vertical" HorizontalAlignment="Center" MaxWidth="800"> -->
<!-- <info:LinkBanner Name="LinkBanner" VerticalExpand="false" HorizontalAlignment="Center" -->
<!-- Margin="3 3 3 3" /> -->
<!-- <controls:StripeBack> -->
<!-- <BoxContainer Orientation="Horizontal" SeparationOverride="6" Margin="3 3 3 3"> -->
<!-- <cc:UICommandButton Command="observe" Name="ObserveButton" Access="Public" -->
<!-- Text="{Loc 'ui-lobby-observe-button'}" -->
<!-- StyleClasses="ButtonBig" -->
<!-- WindowType="{x:Type lobbyUi:ObserveWarningWindow}" /> -->
<!-- <Label Name="StartTime" -->
<!-- Access="Public" -->
<!-- Align="Left" -->
<!-- FontColorOverride="{x:Static maths:Color.DarkGray}" -->
<!-- StyleClasses="LabelBig" HorizontalExpand="True" /> -->
<!-- <Button Name="ReadyButton" Access="Public" ToggleMode="True" -->
<!-- Text="{Loc 'ui-lobby-ready-up-button'}" -->
<!-- StyleClasses="ButtonBig" MinWidth="137" /> -->
<!-- </BoxContainer> -->
<!-- </controls:StripeBack> -->
<!-- </BoxContainer> -->
<!-- </PanelContainer> -->
<!-- Voting Popups -->
<BoxContainer Orientation="Vertical" SeparationOverride="4" Name="VoteContainer"
Access="Public" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 8" />
</BoxContainer>


<!-- Center Panel -->
<PanelContainer Name="CenterPanel" HorizontalAlignment="Center" VerticalExpand="True"
VerticalAlignment="Center" Access="Public">
<PanelContainer.PanelOverride>
<graphics:StyleBoxFlat BackgroundColor="#151515" />
</PanelContainer.PanelOverride>
<GridContainer Rows="4" Columns="1">

<!-- Game Title -->
<PanelContainer Margin="12 12 12 12">
<PanelContainer.PanelOverride>
<graphics:StyleBoxFlat BackgroundColor="#76428AFF" />
</PanelContainer.PanelOverride>
<Label Name="GameName" Margin="4 4 4 4" StyleClasses="LabelHeadingXL" VAlign="Center"
Text="ACROSS THE VEIL" FontColorOverride="{x:Static maths:Color.White}">
</Label>
</PanelContainer>

<!-- Buttons -->
<GridContainer Columns="1">
<Label Name="StartTime"
Access="Public"
Align="Left"
FontColorOverride="{x:Static maths:Color.DarkGray}"
StyleClasses="LabelKeyText" HorizontalExpand="True"
Margin="8 0 0 0"/>
<Button Name="ReadyButton" Access="Public" ToggleMode="True"
Text="{Loc 'ui-lobby-ready-up-button'}"
StyleClasses="ButtonBig" MinWidth="137"
Margin="8 16 8 0"/>
<cc:UICommandButton Command="observe" Name="ObserveButton" Access="Public"
Text="{Loc 'ui-lobby-observe-button'}"
StyleClasses="ButtonBig"
WindowType="{x:Type lobbyUi:ObserveWarningWindow}"
Margin="8 0 8 0"/>
<!-- <Button Name="AHelpButton" Access="Public" Text="{Loc 'ui-lobby-ahelp-button'}" -->
<!-- StyleClasses="ButtonBig" /> -->
<Button Name="SetupCharacterButton" Access="Public" StyleClasses="ButtonBig"
Text="{Loc 'ui-lobby-character-button'}"
Margin="8 0 8 0"/>
<Button Name="OptionsButton" Access="Public" StyleClasses="ButtonBig"
Text="{Loc 'ui-lobby-options-button'}"
Margin="8 0 8 0"/>
<!-- <vote:VoteCallMenuButton Name="CallVoteButton" StyleClasses="ButtonBig" /> -->
<Button Name="LeaveButton" Access="Public" StyleClasses="ButtonBig"
Text="{Loc 'ui-lobby-leave-button'}"
Margin="8 0 8 12"/>
</GridContainer>
</GridContainer>
</PanelContainer>

<!-- Vertical Padding-->
<Control VerticalExpand="True" />
<!-- Left Bot Panel -->
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom">
<!-- actually, its left center now -->
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom">
<Button Access="Public" Name="ToggleMenu" Text="{Loc 'ui-lobby-toggle-menu'}" />
<info:DevInfoBanner Name="DevInfoBanner" VerticalExpand="false" Margin="3 3 3 3" />
<PanelContainer StyleClasses="AngleRect">
<RichTextLabel Name="LobbySong" Access="Public" HorizontalAlignment="Center" />
Expand All @@ -61,12 +118,16 @@
<!-- This is injected on startup. Funky! -->
<Control Access="Public" Visible="False" Name="CharacterSetupState" VerticalExpand="True" />
</BoxContainer>

<!-- Right Panel -->
<PanelContainer Name="RightSide" StyleClasses="AngleRect" HorizontalAlignment="Right" VerticalExpand="True"
VerticalAlignment="Stretch">
VerticalAlignment="Stretch" Access="Public">
<PanelContainer.PanelOverride>
<graphics:StyleBoxFlat BackgroundColor="#76428A88" />
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
<!-- Top row -->
<BoxContainer Orientation="Horizontal" MinSize="0 40" Name="HeaderContainer" Access="Public"
<BoxContainer Orientation="Horizontal" MinSize="0 40" Name="HeaderContainer2" Access="Public"
SeparationOverride="4">
<Label Margin="8 0 0 0" StyleClasses="LabelHeadingBigger" VAlign="Center"
Text="{Loc 'ui-lobby-title'}" />
Expand All @@ -77,15 +138,6 @@
<controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="2" />
<controls:HSpacer Spacing="10" />
<!-- Voting & misc button bar -->
<BoxContainer Orientation="Horizontal" MinSize="0 40" HorizontalAlignment="Right">
<Button Name="AHelpButton" Access="Public" Text="{Loc 'ui-lobby-ahelp-button'}"
StyleClasses="ButtonBig" />
<vote:VoteCallMenuButton Name="CallVoteButton" StyleClasses="ButtonBig" />
<Button Name="OptionsButton" Access="Public" StyleClasses="ButtonBig"
Text="{Loc 'ui-lobby-options-button'}" />
<Button Name="LeaveButton" Access="Public" StyleClasses="ButtonBig"
Text="{Loc 'ui-lobby-leave-button'}" />
</BoxContainer>
<controls:HSpacer Spacing="10" />
<!-- Server info -->
<controls:NanoHeading Text="{Loc 'ui-lobby-server-info-block'}" />
Expand All @@ -94,8 +146,6 @@
<Label Name="StationTime" Access="Public" FontColorOverride="{x:Static maths:Color.LightGray}"
Margin="3 3 3 3" HorizontalAlignment="Left" />
<controls:HSpacer Spacing="5" />
<lobbyUi:LobbyCharacterPreviewPanel Name="CharacterPreview" Access="Public" />
<controls:HSpacer Spacing="5" />
<BoxContainer MinHeight="10" />
<!-- Gold line -->
<controls:HLine Color="{x:Static style:StyleNano.NanoGold}" Thickness="2" Access="Public" />
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/NPC/HTN/HTNOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed class HTNOverlay : Overlay
public HTNOverlay(IEntityManager entManager, IResourceCache resourceCache)
{
_entManager = entManager;
_font = new VectorFont(resourceCache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 10);
_font = new VectorFont(resourceCache.GetResource<FontResource>("/Fonts/B612_Mono/B612_Mono-Regular.ttf"), 10);
}

protected override void Draw(in OverlayDrawArgs args)
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/NPC/PathfindingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public PathfindingOverlay(
_mapManager = mapManager;
_system = system;
_mapSystem = mapSystem;
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 10);
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/B612_Mono/B612_Mono-Regular.ttf"), 10);
}

protected override void Draw(in OverlayDrawArgs args)
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/NodeContainer/NodeVisualizationOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public NodeVisualizationOverlay(
_inputManager = inputManager;
_entityManager = entityManager;

_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)
Expand Down
6 changes: 3 additions & 3 deletions Content.Client/Popups/PopupOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public PopupOverlay(
_popup = popup;

_shader = protoManager.Index<ShaderPrototype>("unshaded").Instance();
_smallFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Italic.ttf"), 10);
_mediumFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Italic.ttf"), 12);
_largeFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-BoldItalic.ttf"), 14);
_smallFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/B612_Mono/B612_Mono-Italic.ttf"), 10);
_mediumFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/B612_Mono/B612_Mono-Italic.ttf"), 12);
_largeFont = new VectorFont(cache.GetResource<FontResource>("/Fonts/B612_Mono/B612_Mono-BoldItalic.ttf"), 14);
}

protected override void Draw(in OverlayDrawArgs args)
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Radiation/Overlays/RadiationDebugOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public RadiationDebugOverlay()
_radiation = _entityManager.System<RadiationSystem>();

var cache = IoCManager.Resolve<IResourceCache>();
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/IBMPlexMono/IBMPlexMono-Regular.ttf"), 8);
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/B612_Mono/B612_Mono-Regular.ttf"), 8);
}

protected override void Draw(in OverlayDrawArgs args)
Expand Down
Loading
Loading