From a2b04482a41d12abd8392374a97c0fea52560fb8 Mon Sep 17 00:00:00 2001 From: moonheart08 Date: Fri, 8 Oct 2021 09:22:57 -0500 Subject: [PATCH] Add a warning dialog to the observe button. (#4794) --- Content.Client/Lobby/LobbyState.cs | 1 - Content.Client/Lobby/UI/LobbyGui.xaml | 3 ++- .../Lobby/UI/ObserveWarningWindow.xaml | 13 ++++++++++ .../Lobby/UI/ObserveWarningWindow.xaml.cs | 24 +++++++++++++++++++ .../en-US/lobby/ui/observe-warning-window.ftl | 4 ++++ 5 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 Content.Client/Lobby/UI/ObserveWarningWindow.xaml create mode 100644 Content.Client/Lobby/UI/ObserveWarningWindow.xaml.cs create mode 100644 Resources/Locale/en-US/lobby/ui/observe-warning-window.ftl diff --git a/Content.Client/Lobby/LobbyState.cs b/Content.Client/Lobby/LobbyState.cs index 37e4aa4bfe..31ef2d3c8b 100644 --- a/Content.Client/Lobby/LobbyState.cs +++ b/Content.Client/Lobby/LobbyState.cs @@ -84,7 +84,6 @@ namespace Content.Client.Lobby _userInterfaceManager.StateRoot.AddChild(_characterSetup); }; - _lobby.ObserveButton.OnPressed += _ => _consoleHost.ExecuteCommand("observe"); _lobby.ReadyButton.OnPressed += _ => { if (!gameTicker.IsGameStarted) diff --git a/Content.Client/Lobby/UI/LobbyGui.xaml b/Content.Client/Lobby/UI/LobbyGui.xaml index 09bcf1f5f8..d21526aab6 100644 --- a/Content.Client/Lobby/UI/LobbyGui.xaml +++ b/Content.Client/Lobby/UI/LobbyGui.xaml @@ -2,6 +2,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" xmlns:maths="clr-namespace:Robust.Shared.Maths;assembly=Robust.Shared.Maths" + xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls" xmlns:parallax="clr-namespace:Content.Client.Parallax" xmlns:ui="clr-namespace:Content.Client.Voting.UI" xmlns:style="clr-namespace:Content.Client.Stylesheets" @@ -37,7 +38,7 @@ -