Fix lobby votes (#15041)
This commit is contained in:
@@ -59,6 +59,8 @@ namespace Content.Client.Lobby
|
|||||||
_lobby.CharacterSetupState.AddChild(_characterSetup);
|
_lobby.CharacterSetupState.AddChild(_characterSetup);
|
||||||
chatController.SetMainChat(true);
|
chatController.SetMainChat(true);
|
||||||
|
|
||||||
|
_voteManager.SetPopupContainer(_lobby.VoteContainer);
|
||||||
|
|
||||||
_characterSetup.CloseButton.OnPressed += _ =>
|
_characterSetup.CloseButton.OnPressed += _ =>
|
||||||
{
|
{
|
||||||
_lobby.SwitchState(LobbyGui.LobbyGuiState.Default);
|
_lobby.SwitchState(LobbyGui.LobbyGuiState.Default);
|
||||||
@@ -91,6 +93,8 @@ namespace Content.Client.Lobby
|
|||||||
_gameTicker.LobbyStatusUpdated -= LobbyStatusUpdated;
|
_gameTicker.LobbyStatusUpdated -= LobbyStatusUpdated;
|
||||||
_gameTicker.LobbyLateJoinStatusUpdated -= LobbyLateJoinStatusUpdated;
|
_gameTicker.LobbyLateJoinStatusUpdated -= LobbyLateJoinStatusUpdated;
|
||||||
|
|
||||||
|
_lobby!.VoteContainer.Orphan();
|
||||||
|
|
||||||
_lobby!.CharacterPreview.CharacterSetupButton.OnPressed -= OnSetupPressed;
|
_lobby!.CharacterPreview.CharacterSetupButton.OnPressed -= OnSetupPressed;
|
||||||
_lobby!.ReadyButton.OnPressed -= OnReadyPressed;
|
_lobby!.ReadyButton.OnPressed -= OnReadyPressed;
|
||||||
_lobby!.ReadyButton.OnToggled -= OnReadyToggled;
|
_lobby!.ReadyButton.OnToggled -= OnReadyToggled;
|
||||||
|
|||||||
@@ -15,26 +15,28 @@
|
|||||||
<!-- LHS Controls -->
|
<!-- LHS Controls -->
|
||||||
<BoxContainer Name="LeftSide" Orientation="Vertical" SeparationOverride="4" HorizontalExpand="True">
|
<BoxContainer Name="LeftSide" Orientation="Vertical" SeparationOverride="4" HorizontalExpand="True">
|
||||||
<Control Name="DefaultState" VerticalExpand="True">
|
<Control Name="DefaultState" VerticalExpand="True">
|
||||||
<!-- Left Top Panel -->
|
<BoxContainer Name="TopLeft" Orientation="Vertical">
|
||||||
<PanelContainer StyleClasses="AngleRect" HorizontalAlignment="Left" Name = "LeftSideTop" VerticalAlignment="Top" >
|
<!-- Left Top Panel -->
|
||||||
<BoxContainer Orientation="Vertical" HorizontalAlignment="Center" MaxWidth="800">
|
<PanelContainer StyleClasses="AngleRect" HorizontalAlignment="Left" Name = "LeftSideTop" VerticalAlignment="Top" >
|
||||||
<info:LinkBanner Name="LinkBanner" VerticalExpand="false" HorizontalAlignment="Center" Margin="3 3 3 3"/>
|
<BoxContainer Orientation="Vertical" HorizontalAlignment="Center" MaxWidth="800">
|
||||||
<controls:StripeBack>
|
<info:LinkBanner Name="LinkBanner" VerticalExpand="false" HorizontalAlignment="Center" Margin="3 3 3 3"/>
|
||||||
<BoxContainer Orientation="Horizontal" SeparationOverride="6" Margin="3 3 3 3">
|
<controls:StripeBack>
|
||||||
<cc:UICommandButton Command="observe" Name="ObserveButton" Access="Public" Text="{Loc 'ui-lobby-observe-button'}" StyleClasses="ButtonBig" WindowType="{x:Type lobbyUi:ObserveWarningWindow}"/>
|
<BoxContainer Orientation="Horizontal" SeparationOverride="6" Margin="3 3 3 3">
|
||||||
<Label Name="StartTime"
|
<cc:UICommandButton Command="observe" Name="ObserveButton" Access="Public" Text="{Loc 'ui-lobby-observe-button'}" StyleClasses="ButtonBig" WindowType="{x:Type lobbyUi:ObserveWarningWindow}"/>
|
||||||
Access="Public"
|
<Label Name="StartTime"
|
||||||
Align="Left"
|
Access="Public"
|
||||||
FontColorOverride="{x:Static maths:Color.DarkGray}"
|
Align="Left"
|
||||||
StyleClasses="LabelBig" HorizontalExpand="True" />
|
FontColorOverride="{x:Static maths:Color.DarkGray}"
|
||||||
<Button Name="ReadyButton" Access="Public" ToggleMode="True" Text="{Loc 'ui-lobby-ready-up-button'}"
|
StyleClasses="LabelBig" HorizontalExpand="True" />
|
||||||
StyleClasses="ButtonBig" MinWidth="137"/>
|
<Button Name="ReadyButton" Access="Public" ToggleMode="True" Text="{Loc 'ui-lobby-ready-up-button'}"
|
||||||
</BoxContainer>
|
StyleClasses="ButtonBig" MinWidth="137"/>
|
||||||
</controls:StripeBack>
|
</BoxContainer>
|
||||||
</BoxContainer>
|
</controls:StripeBack>
|
||||||
</PanelContainer>
|
</BoxContainer>
|
||||||
<!-- Voting Popups -->
|
</PanelContainer>
|
||||||
<BoxContainer Orientation="Vertical" SeparationOverride="4" Name="VoteContainer" Access="Public" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
<!-- Voting Popups -->
|
||||||
|
<BoxContainer Orientation="Vertical" SeparationOverride="4" Name="VoteContainer" Access="Public" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 8"/>
|
||||||
|
</BoxContainer>
|
||||||
<!-- Vertical Padding-->
|
<!-- Vertical Padding-->
|
||||||
<Control VerticalExpand="True"/>
|
<Control VerticalExpand="True"/>
|
||||||
<!-- Left Bot Panel -->
|
<!-- Left Bot Panel -->
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
using Content.Client.UserInterface.Screens;
|
using Content.Client.UserInterface.Screens;
|
||||||
using Content.Client.UserInterface.Systems.Gameplay;
|
using Content.Client.UserInterface.Systems.Gameplay;
|
||||||
using Content.Client.Voting;
|
using Content.Client.Voting;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using Robust.Client.UserInterface.Controllers;
|
using Robust.Client.UserInterface.Controllers;
|
||||||
|
|
||||||
namespace Content.Client.UserInterface.Systems.Vote;
|
namespace Content.Client.UserInterface.Systems.Vote;
|
||||||
|
|
||||||
|
[UsedImplicitly]
|
||||||
public sealed class VoteUIController : UIController
|
public sealed class VoteUIController : UIController
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IVoteManager _votes = default!;
|
[Dependency] private readonly IVoteManager _votes = default!;
|
||||||
|
|||||||
Reference in New Issue
Block a user