Technology Disks (#13077)
* clean up a bunch of R&D code * don't store components * brug * speedrun some sloth review * technology disks * expand functionality, begin work on printer * disk printer ui * file * fix the rebase * disk console is finito * Update DiskConsoleSystem.cs
This commit is contained in:
29
Content.Client/Research/UI/DiskConsoleMenu.xaml.cs
Normal file
29
Content.Client/Research/UI/DiskConsoleMenu.xaml.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Content.Shared.Research;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
|
||||
namespace Content.Client.Research.UI;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class DiskConsoleMenu : FancyWindow
|
||||
{
|
||||
public event Action? OnServerButtonPressed;
|
||||
public event Action? OnPrintButtonPressed;
|
||||
|
||||
public DiskConsoleMenu()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
ServerButton.OnPressed += _ => OnServerButtonPressed?.Invoke();
|
||||
PrintButton.OnPressed += _ => OnPrintButtonPressed?.Invoke();
|
||||
}
|
||||
|
||||
public void Update(DiskConsoleBoundUserInterfaceState state)
|
||||
{
|
||||
PrintButton.Disabled = !state.CanPrint;
|
||||
TotalLabel.Text = Loc.GetString("tech-disk-ui-total-label", ("amount", state.ServerPoints));
|
||||
CostLabel.Text = Loc.GetString("tech-disk-ui-cost-label", ("amount", state.PointCost));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user