* Basic voting

* Rewrite lobby in XAML.
Working lobby voting.

* Escape menu is now XAML.

* Vote menu works, custom votes, gamemode votes.

* Vote timeouts & administration.

Basically done now.

* I will now pretend I was never planning to code voting hotkeys.

* Make vote call UI a bit... funny.

* Fix exception on round restart.

* Fix some vote command definitions.
This commit is contained in:
Pieter-Jan Briers
2021-02-16 15:07:17 +01:00
committed by GitHub
parent db290fd91e
commit cea87d6985
35 changed files with 2001 additions and 413 deletions

View File

@@ -3,6 +3,7 @@ using System.Linq;
using Content.Client.Interfaces;
using Content.Client.Interfaces.Chat;
using Content.Client.UserInterface;
using Content.Client.Voting;
using Content.Shared.Input;
using Robust.Client;
using Robust.Client.Console;
@@ -36,6 +37,7 @@ namespace Content.Client.State
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
[Dependency] private readonly IClientPreferencesManager _preferencesManager = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IVoteManager _voteManager = default!;
[ViewVariables] private CharacterSetupGui _characterSetup;
[ViewVariables] private LobbyGui _lobby;
@@ -58,12 +60,14 @@ namespace Content.Client.State
_lobby.CharacterPreview.UpdateUI();
};
_lobby = new LobbyGui(_entityManager, _resourceCache, _preferencesManager);
_lobby = new LobbyGui(_entityManager, _preferencesManager);
_userInterfaceManager.StateRoot.AddChild(_lobby);
LayoutContainer.SetAnchorPreset(_lobby, LayoutContainer.LayoutPreset.Wide);
_chatManager.SetChatBox(_lobby.Chat);
_voteManager.SetPopupContainer(_lobby.VoteContainer);
_lobby.Chat.DefaultChatFormat = "ooc \"{0}\"";
_lobby.ServerName.Text = _baseClient.GameInfo.ServerName;