Add informations to cargo order form (#10513)
This commit is contained in:
@@ -6,6 +6,7 @@ using Content.Shared.Cargo.Prototypes;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.Prototypes;
|
||||
using static Robust.Client.UserInterface.Controls.BaseButton;
|
||||
|
||||
@@ -52,6 +53,7 @@ namespace Content.Client.Cargo.BUI
|
||||
var spriteSystem = sysManager.GetEntitySystem<SpriteSystem>();
|
||||
_menu = new CargoConsoleMenu(IoCManager.Resolve<IPrototypeManager>(), spriteSystem);
|
||||
var localPlayer = IoCManager.Resolve<IPlayerManager>()?.LocalPlayer?.ControlledEntity;
|
||||
var description = new FormattedMessage();
|
||||
|
||||
string orderRequester;
|
||||
|
||||
@@ -68,10 +70,20 @@ namespace Content.Client.Cargo.BUI
|
||||
{
|
||||
if (args.Button.Parent is not CargoProductRow row)
|
||||
return;
|
||||
|
||||
description.Clear();
|
||||
description.PushColor(Color.White); // Rich text default color is grey
|
||||
if (row.MainButton.ToolTip != null)
|
||||
description.AddText(row.MainButton.ToolTip);
|
||||
_orderMenu.Description.SetMessage(description);
|
||||
|
||||
_product = row.Product;
|
||||
_orderMenu.ProductName.Text = row.ProductName.Text;
|
||||
_orderMenu.PointCost.Text = row.PointCost.Text;
|
||||
_orderMenu.Requester.Text = orderRequester;
|
||||
_orderMenu.Reason.Text = "";
|
||||
_orderMenu.Amount.Value = 1;
|
||||
|
||||
_orderMenu.OpenCentered();
|
||||
};
|
||||
_menu.OnOrderApproved += ApproveOrder;
|
||||
|
||||
Reference in New Issue
Block a user