[add] Ahelp volume change

This commit is contained in:
rhailrake
2023-04-28 07:55:20 +06:00
committed by Aviu00
parent e458ec9fcd
commit a6f88c6608
6 changed files with 133 additions and 3 deletions

View File

@@ -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);
@@ -20,6 +22,7 @@ namespace Content.Client.Options.UI
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();
}
@@ -28,5 +31,11 @@ namespace Content.Client.Options.UI
{
GraphicsTab.UpdateProperties();
}
protected override void FrameUpdate(FrameEventArgs args)
{
Tabs.SetTabVisible(5, _clientAdminManager.IsActive());
base.FrameUpdate(args);
}
}
}