Button to return to body

This commit is contained in:
zumorica
2020-03-03 19:10:07 +01:00
parent 6905394e8a
commit 055f09d501
5 changed files with 114 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
using Content.Client.Observer;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.IoC;
@@ -6,13 +7,20 @@ namespace Content.Client.UserInterface
{
public class GhostGui : Control
{
public GhostGui()
public Button ReturnToBody = new Button(){Text = "Return to body"};
private GhostComponent _owner;
public GhostGui(GhostComponent owner)
{
IoCManager.InjectDependencies(this);
_owner = owner;
MouseFilter = MouseFilterMode.Ignore;
AddChild(new Label(){Text = "YES THIS IS GHOST WHOOOOOO"});
ReturnToBody.OnPressed += (args) => { owner.SendReturnToBodyMessage(); };
AddChild(ReturnToBody);
}
}
}