We have a lobby! (#127)

It's shoddy as hell but it works for our purposes.
This commit is contained in:
Pieter-Jan Briers
2018-11-25 19:04:49 +01:00
committed by GitHub
parent f887d22a16
commit 845d0f9182
13 changed files with 1054 additions and 89 deletions

View File

@@ -0,0 +1,35 @@
using SS14.Client.UserInterface;
using SS14.Client.UserInterface.Controls;
using SS14.Client.UserInterface.CustomControls;
using SS14.Shared.Utility;
namespace Content.Client.UserInterface
{
public class LobbyGui : Control
{
protected override ResourcePath ScenePath => new ResourcePath("/Scenes/Lobby/Lobby.tscn");
public Label ServerName => GetChild<Label>("Panel/VBoxContainer/TitleContainer/ServerName");
public Label StartTime => GetChild<Label>("Panel/VBoxContainer/HBoxContainer/LeftVBox/ReadyButtons/RoundStartText");
public Button ReadyButton =>
GetChild<Button>("Panel/VBoxContainer/HBoxContainer/LeftVBox/ReadyButtons/ReadyButton");
public Button ObserveButton =>
GetChild<Button>("Panel/VBoxContainer/HBoxContainer/LeftVBox/ReadyButtons/ObserveButton");
public Button LeaveButton => GetChild<Button>("Panel/VBoxContainer/TitleContainer/LeaveButton");
public Chatbox Chat { get; private set; }
protected override void Initialize()
{
base.Initialize();
var chatContainer = GetChild("Panel/VBoxContainer/HBoxContainer/LeftVBox");
Chat = new Chatbox();
chatContainer.AddChild(Chat);
Chat.SizeFlagsVertical = SizeFlags.FillExpand;
}
}
}