27 lines
741 B
C#
27 lines
741 B
C#
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.UserInterface.CustomControls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
namespace Content.Client._NF.Cargo.UI;
|
|
|
|
[GenerateTypedNameReferences]
|
|
sealed partial class NFCargoConsoleOrderMenu : DefaultWindow
|
|
{
|
|
public int OrderCapacity;
|
|
public NFCargoConsoleOrderMenu(int orderCapacity)
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
|
|
OrderCapacity = orderCapacity;
|
|
|
|
Amount.SetButtons(new List<int> { -3, -2, -1 }, new List<int> { 1, 2, 3 });
|
|
Amount.IsValid = n => n > 0 && n <= OrderCapacity;
|
|
}
|
|
|
|
public void SetOrderCapacity(int orderCapacity)
|
|
{
|
|
OrderCapacity = orderCapacity;
|
|
Amount.IsValid = n => n > 0 && n <= OrderCapacity;
|
|
}
|
|
}
|