UI Layout v2. (#489)

* UI Layout v2.

* Lobby fixed.
This commit is contained in:
Pieter-Jan Briers
2019-12-05 16:00:03 +01:00
committed by GitHub
parent 4cf8e18d1f
commit 26da24c3c5
37 changed files with 220 additions and 229 deletions

View File

@@ -14,6 +14,7 @@ using Robust.Client.Interfaces.ResourceManagement;
using Robust.Client.Interfaces.UserInterface;
using Robust.Client.Player;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Input;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.IoC;
@@ -191,7 +192,7 @@ namespace Content.Client.GameTicking
_lobby = new LobbyGui(_localization, _resourceCache);
_userInterfaceManager.StateRoot.AddChild(_lobby);
_lobby.SetAnchorAndMarginPreset(Control.LayoutPreset.Wide, margin: 20);
LayoutContainer.SetAnchorPreset(_lobby, LayoutContainer.LayoutPreset.Wide);
_chatManager.SetChatBox(_lobby.Chat);
_lobby.Chat.DefaultChatFormat = "ooc \"{0}\"";
@@ -246,6 +247,11 @@ namespace Content.Client.GameTicking
_gameChat = new ChatBox();
_userInterfaceManager.StateRoot.AddChild(_gameChat);
LayoutContainer.SetAnchorAndMarginPreset(_gameChat, LayoutContainer.LayoutPreset.TopRight, margin: 10);
LayoutContainer.SetAnchorAndMarginPreset(_gameChat, LayoutContainer.LayoutPreset.TopRight, margin: 10);
LayoutContainer.SetMarginLeft(_gameChat, -475);
LayoutContainer.SetMarginBottom(_gameChat, 235);
_userInterfaceManager.StateRoot.AddChild(_gameHud.RootControl);
_chatManager.SetChatBox(_gameChat);
_gameChat.DefaultChatFormat = "say \"{0}\"";
@@ -261,6 +267,7 @@ namespace Content.Client.GameTicking
{
return;
}
chat.Input.IgnoreNext = true;
chat.Input.GrabKeyboardFocus();
}