40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using Content.Client.Message;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using Robust.Client.UserInterface.CustomControls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
using Robust.Shared.IoC;
|
|
using Robust.Shared.Localization;
|
|
|
|
namespace Content.Client.Gravity.UI
|
|
{
|
|
[GenerateTypedNameReferences]
|
|
public partial class GravityGeneratorWindow : SS14Window
|
|
{
|
|
private readonly GravityGeneratorBoundUserInterface _owner;
|
|
|
|
public GravityGeneratorWindow(GravityGeneratorBoundUserInterface ui)
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
IoCManager.InjectDependencies(this);
|
|
|
|
_owner = ui;
|
|
|
|
UpdateButton();
|
|
}
|
|
|
|
public void UpdateButton()
|
|
{
|
|
string status = Loc.GetString(_owner.IsOn
|
|
? "gravity-generator-window-is-on"
|
|
: "gravity-generator-window-is-off");
|
|
|
|
Status.SetMarkup(Loc.GetString("gravity-generator-window-status-label", ("status", status)));
|
|
|
|
Switch.Text = Loc.GetString(_owner.IsOn
|
|
? "gravity-generator-window-turn-off-button"
|
|
: "gravity-generator-window-turn-on-button");
|
|
}
|
|
}
|
|
}
|