Re-organize all projects (#4166)
This commit is contained in:
58
Content.Client/Administration/UI/AdminMenuWindow.xaml.cs
Normal file
58
Content.Client/Administration/UI/AdminMenuWindow.xaml.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.Administration.UI.Tabs;
|
||||
using Content.Client.HUD;
|
||||
using Content.Shared.Administration.Menu;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Client.Administration.UI
|
||||
{
|
||||
[GenerateTypedNameReferences]
|
||||
public partial class AdminMenuWindow : SS14Window
|
||||
{
|
||||
[Dependency] private readonly IGameHud? _gameHud = default!;
|
||||
|
||||
public event PlayerTab.PlayerListRefresh? OnPlayerListRefresh
|
||||
{
|
||||
add => PlayerTabControl.OnPlayerListRefresh += value;
|
||||
remove => PlayerTabControl.OnPlayerListRefresh -= value;
|
||||
}
|
||||
|
||||
public AdminMenuWindow()
|
||||
{
|
||||
MinSize = SetSize = (500, 250);
|
||||
Title = Loc.GetString("Admin Menu");
|
||||
RobustXamlLoader.Load(this);
|
||||
IoCManager.InjectDependencies(this);
|
||||
MasterTabContainer.SetTabTitle(0, Loc.GetString("Admin"));
|
||||
MasterTabContainer.SetTabTitle(1, Loc.GetString("Adminbus"));
|
||||
MasterTabContainer.SetTabTitle(2, Loc.GetString("Atmos"));
|
||||
MasterTabContainer.SetTabTitle(3, Loc.GetString("Round"));
|
||||
MasterTabContainer.SetTabTitle(4, Loc.GetString("Server"));
|
||||
MasterTabContainer.SetTabTitle(5, Loc.GetString("Players"));
|
||||
}
|
||||
|
||||
protected override void EnteredTree()
|
||||
{
|
||||
base.EnteredTree();
|
||||
if (_gameHud != null)
|
||||
_gameHud.AdminButtonDown = true;
|
||||
}
|
||||
|
||||
protected override void ExitedTree()
|
||||
{
|
||||
base.ExitedTree();
|
||||
if (_gameHud != null)
|
||||
_gameHud.AdminButtonDown = false;
|
||||
}
|
||||
|
||||
public void RefreshPlayerList(IEnumerable<AdminMenuPlayerListMessage.PlayerInfo> players)
|
||||
{
|
||||
PlayerTabControl.RefreshPlayerList(players);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user