Re-organize all projects (#4166)

This commit is contained in:
DrSmugleaf
2021-06-09 22:19:39 +02:00
committed by GitHub
parent 9f50e4061b
commit ff1a2d97ea
1773 changed files with 5258 additions and 5508 deletions

View 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);
}
}
}