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

46 lines
1.4 KiB
C#
Raw Normal View History

using Robust.Client.UserInterface.Controls;
2020-09-07 11:08:01 +02:00
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Interfaces.Configuration;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
2020-09-07 11:08:01 +02:00
using Robust.Shared.Maths;
#nullable enable
2020-09-07 11:08:01 +02:00
namespace Content.Client.UserInterface
{
public sealed partial class OptionsMenu : SS14Window
2020-09-07 11:08:01 +02:00
{
[Dependency] private readonly IConfigurationManager _configManager = default!;
2020-09-07 11:08:01 +02:00
protected override Vector2? CustomSize => (800, 450);
2020-09-07 11:08:01 +02:00
public OptionsMenu()
2020-09-07 11:08:01 +02:00
{
IoCManager.InjectDependencies(this);
2020-09-07 11:08:01 +02:00
Title = Loc.GetString("Game Options");
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)),
}
2020-09-07 11:08:01 +02:00
};
TabContainer.SetTabTitle(graphicsControl, Loc.GetString("Graphics"));
TabContainer.SetTabTitle(rebindControl, Loc.GetString("Controls"));
TabContainer.SetTabTitle(audioControl, Loc.GetString("Audio"));
2020-09-07 11:08:01 +02:00
Contents.AddChild(tabs);
2020-09-07 11:08:01 +02:00
}
}
}