Files
OldThink/Content.Client/UserInterface/OptionsMenu.cs

45 lines
1.5 KiB
C#
Raw Normal View History

using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
2020-09-07 11:08:01 +02:00
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Configuration;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
2020-09-07 11:08:01 +02:00
using Robust.Shared.Maths;
namespace Content.Client.UserInterface
{
public sealed partial class OptionsMenu : SS14Window
2020-09-07 11:08:01 +02:00
{
[Dependency] private readonly IConfigurationManager _configManager = default!;
[Dependency] private readonly IClydeAudio _clydeAudio = default!;
2020-09-07 11:08:01 +02:00
public OptionsMenu()
2020-09-07 11:08:01 +02:00
{
2021-02-21 12:38:56 +01:00
SetSize = MinSize = (800, 450);
IoCManager.InjectDependencies(this);
2020-09-07 11:08:01 +02:00
2021-02-25 21:08:06 +01:00
Title = Loc.GetString("ui-options-title");
2020-09-07 11:08:01 +02:00
GraphicsControl graphicsControl;
KeyRebindControl rebindControl;
AudioControl audioControl;
2020-09-07 11:08:01 +02:00
var tabs = new TabContainer
2020-09-07 11:08:01 +02:00
{
Children =
{
(graphicsControl = new GraphicsControl(_configManager)),
(rebindControl = new KeyRebindControl()),
(audioControl = new AudioControl(_configManager, _clydeAudio)),
}
2020-09-07 11:08:01 +02:00
};
2021-02-25 21:08:06 +01:00
TabContainer.SetTabTitle(graphicsControl, Loc.GetString("ui-options-tab-graphics"));
TabContainer.SetTabTitle(rebindControl, Loc.GetString("ui-options-tab-controls"));
TabContainer.SetTabTitle(audioControl, Loc.GetString("ui-options-tab-audio"));
2020-09-07 11:08:01 +02:00
Contents.AddChild(tabs);
2020-09-07 11:08:01 +02:00
}
}
}