Fix lobby votes (#15041)

This commit is contained in:
metalgearsloth
2023-04-02 01:00:48 +11:00
committed by GitHub
parent 62658b222d
commit 4cb3e464ac
3 changed files with 28 additions and 20 deletions

View File

@@ -59,6 +59,8 @@ namespace Content.Client.Lobby
_lobby.CharacterSetupState.AddChild(_characterSetup);
chatController.SetMainChat(true);
_voteManager.SetPopupContainer(_lobby.VoteContainer);
_characterSetup.CloseButton.OnPressed += _ =>
{
_lobby.SwitchState(LobbyGui.LobbyGuiState.Default);
@@ -91,6 +93,8 @@ namespace Content.Client.Lobby
_gameTicker.LobbyStatusUpdated -= LobbyStatusUpdated;
_gameTicker.LobbyLateJoinStatusUpdated -= LobbyLateJoinStatusUpdated;
_lobby!.VoteContainer.Orphan();
_lobby!.CharacterPreview.CharacterSetupButton.OnPressed -= OnSetupPressed;
_lobby!.ReadyButton.OnPressed -= OnReadyPressed;
_lobby!.ReadyButton.OnToggled -= OnReadyToggled;

View File

@@ -15,6 +15,7 @@
<!-- 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">
@@ -34,7 +35,8 @@
</BoxContainer>
</PanelContainer>
<!-- Voting Popups -->
<BoxContainer Orientation="Vertical" SeparationOverride="4" Name="VoteContainer" Access="Public" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<BoxContainer Orientation="Vertical" SeparationOverride="4" Name="VoteContainer" Access="Public" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 8"/>
</BoxContainer>
<!-- Vertical Padding-->
<Control VerticalExpand="True"/>
<!-- Left Bot Panel -->

View File

@@ -1,10 +1,12 @@
using Content.Client.UserInterface.Screens;
using Content.Client.UserInterface.Systems.Gameplay;
using Content.Client.Voting;
using JetBrains.Annotations;
using Robust.Client.UserInterface.Controllers;
namespace Content.Client.UserInterface.Systems.Vote;
[UsedImplicitly]
public sealed class VoteUIController : UIController
{
[Dependency] private readonly IVoteManager _votes = default!;