Re-organize all projects (#4166)

This commit is contained in:
DrSmugleaf
2021-06-09 22:19:39 +02:00
committed by GitHub
parent 9f50e4061b
commit ff1a2d97ea
1773 changed files with 5258 additions and 5508 deletions

View File

@@ -0,0 +1,49 @@
#nullable enable
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.GameObjects;
using static Robust.Client.UserInterface.Controls.BaseButton;
namespace Content.Client.Ghost.Roles.UI
{
[GenerateTypedNameReferences]
public partial class MakeGhostRoleWindow : SS14Window
{
public delegate void MakeRole(EntityUid uid, string name, string description, bool makeSentient);
public MakeGhostRoleWindow()
{
RobustXamlLoader.Load(this);
MakeSentientLabel.MinSize = (150, 0);
RoleEntityLabel.MinSize = (150, 0);
RoleNameLabel.MinSize = (150, 0);
RoleName.MinSize = (300, 0);
RoleDescriptionLabel.MinSize = (150, 0);
RoleDescription.MinSize = (300, 0);
MakeButton.OnPressed += OnPressed;
}
private EntityUid? EntityUid { get; set; }
public event MakeRole? OnMake;
public void SetEntity(EntityUid uid)
{
EntityUid = uid;
RoleEntity.Text = $"{uid}";
}
private void OnPressed(ButtonEventArgs args)
{
if (EntityUid == null)
{
return;
}
OnMake?.Invoke(EntityUid.Value, RoleName.Text, RoleDescription.Text, MakeSentientCheckbox.Pressed);
}
}
}