@@ -1,15 +1,17 @@
|
||||
using Content.Client.Administration.Managers;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.IoC;
|
||||
using Content.Client.Options.UI.Tabs;
|
||||
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Client.Options.UI
|
||||
{
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class OptionsMenu : DefaultWindow
|
||||
{
|
||||
[Dependency] private readonly IClientAdminManager _clientAdminManager = default!;
|
||||
|
||||
public OptionsMenu()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
@@ -19,6 +21,8 @@ namespace Content.Client.Options.UI
|
||||
Tabs.SetTabTitle(1, Loc.GetString("ui-options-tab-graphics"));
|
||||
Tabs.SetTabTitle(2, Loc.GetString("ui-options-tab-controls"));
|
||||
Tabs.SetTabTitle(3, Loc.GetString("ui-options-tab-audio"));
|
||||
Tabs.SetTabTitle(4, Loc.GetString("ui-options-tab-network"));
|
||||
Tabs.SetTabTitle(5, "Админ");
|
||||
|
||||
UpdateTabs();
|
||||
}
|
||||
@@ -27,5 +31,11 @@ namespace Content.Client.Options.UI
|
||||
{
|
||||
GraphicsTab.UpdateProperties();
|
||||
}
|
||||
|
||||
protected override void FrameUpdate(FrameEventArgs args)
|
||||
{
|
||||
Tabs.SetTabVisible(5, _clientAdminManager.IsActive());
|
||||
base.FrameUpdate(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user