Files
tbd-station-14/Content.Client/Cargo/UI/CargoPalletMenu.xaml.cs
metalgearsloth a7388e5c05 Add trade stations (#23863)
* puters

* Start on fulfillment

* weh

* Smol update

* FTL sound fixes or smth iunno

* Add consoles

* More tweaks

* Make it unanchorable

* final wehs

* weh

* Fix 1 test

* Shrimply bump the distance

* cat
2024-01-19 13:02:28 +11:00

47 lines
1.2 KiB
C#

using Content.Client.UserInterface.Controls;
using Content.Shared.Cargo;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
namespace Content.Client.Cargo.UI;
[GenerateTypedNameReferences]
public sealed partial class CargoPalletMenu : FancyWindow
{
public Action? SellRequested;
public Action? AppraiseRequested;
public CargoPalletMenu()
{
RobustXamlLoader.Load(this);
SellButton.OnPressed += OnSellPressed;
AppraiseButton.OnPressed += OnAppraisePressed;
}
public void SetAppraisal(int amount)
{
AppraisalLabel.Text = Loc.GetString("cargo-console-menu-points-amount", ("amount", amount.ToString()));
}
public void SetCount(int count)
{
CountLabel.Text = count.ToString();
}
public void SetEnabled(bool enabled)
{
AppraiseButton.Disabled = !enabled;
SellButton.Disabled = !enabled;
}
private void OnSellPressed(BaseButton.ButtonEventArgs obj)
{
SellRequested?.Invoke();
}
private void OnAppraisePressed(BaseButton.ButtonEventArgs obj)
{
AppraiseRequested?.Invoke();
}
}