mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* Set up _Shitmed groundwork for organ slot manipulation * Groundwork for surgical augments * Add tool panel augments * sprite gaming * code review gaming * i think the textures got swapped * localization gaming * surgery localization gaming * crafting gaming * fix tests * fix tests actually * now we deal with ouroboros * she feed on my back til i * relocation * nuke felinid * augment fixes * event-based battery search * descriptionned --------- Co-authored-by: Lyndomen <49795619+Lyndomen@users.noreply.github.com>
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using Robust.Client.Graphics;
|
|
using Robust.Client.Input;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Shared.Prototypes;
|
|
using Content.Shared._DV.Augments;
|
|
|
|
namespace Content.Client._DV.Augments;
|
|
|
|
public sealed class AugmentToolPanelMenuBoundUserInterface : BoundUserInterface
|
|
{
|
|
[Dependency] private readonly IClyde _displayManager = default!;
|
|
[Dependency] private readonly IInputManager _inputManager = default!;
|
|
[Dependency] private readonly IEntityManager _entMan = default!;
|
|
|
|
private AugmentToolPanelMenu? _menu;
|
|
|
|
public AugmentToolPanelMenuBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
IoCManager.InjectDependencies(this);
|
|
}
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_menu = this.CreateWindow<AugmentToolPanelMenu>();
|
|
_menu.SetEntity(Owner);
|
|
_menu.SendAugmentToolPanelSystemMessageAction += SendAugmentToolPanelSystemMessage;
|
|
|
|
// Open the menu, centered on the mouse
|
|
var vpSize = _displayManager.ScreenSize;
|
|
_menu.OpenCenteredAt(_inputManager.MouseScreenPosition.Position / vpSize);
|
|
}
|
|
|
|
public void SendAugmentToolPanelSystemMessage(EntityUid? desiredTool)
|
|
{
|
|
SendMessage(new AugmentToolPanelSystemMessage(_entMan.GetNetEntity(desiredTool)));
|
|
}
|
|
}
|