Files
tbd-station-14/Content.Client/Chemistry/UI/TransferAmountBoundUserInterface.cs
Leon Friedrich 486dc6ca62 Add Alt-click functionality (#4497)
* Fix ItemSlot Bug

* Add Alt-use Key

* Fix TransferAmount window bug

* Alt-click functionality

* Added AltInteract verbs

* Add new verbs

* verb icons

* Changed Comments

* Change Comments

* Fix disposal verbs

* Changed Get...() to Get...OrNull()

* Changed alt-interact combat behaviour

* Update verb icons

* Inventory interact event

* Add Alt+E secondary binding

* Add alt-z keybinding

* Rename AltUse -> AltActivateItemInWorld
2021-08-21 10:20:18 -07:00

36 lines
1.0 KiB
C#

using Content.Shared.Chemistry;
using Content.Shared.Chemistry.Reagent;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
namespace Content.Client.Chemistry.UI
{
[UsedImplicitly]
public class TransferAmountBoundUserInterface : BoundUserInterface
{
private TransferAmountWindow? _window;
protected override void Open()
{
base.Open();
_window = new TransferAmountWindow();
_window.applyButton.OnPressed += _ =>
{
if (int.TryParse(_window.amountLineEdit.Text, out var i))
{
SendMessage(new TransferAmountSetValueMessage(ReagentUnit.New(i)));
_window.Close();
}
};
_window.OnClose += Close;
_window.OpenCentered();
}
public TransferAmountBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey)
{
}
}
}