Revert "Remove some BUI boilerplate" (#30214)

Revert "Remove some BUI boilerplate (#28399)"

This reverts commit cbf329a82d.
This commit is contained in:
Nemanja
2024-07-20 20:42:27 -04:00
committed by GitHub
parent 6d664c9157
commit cb0ba66be3
137 changed files with 1755 additions and 1096 deletions

View File

@@ -17,19 +17,13 @@ namespace Content.Client.Power.APC.UI
[GenerateTypedNameReferences]
public sealed partial class ApcMenu : FancyWindow
{
public event Action? OnBreaker;
public ApcMenu()
public ApcMenu(ApcBoundUserInterface owner)
{
IoCManager.InjectDependencies(this);
RobustXamlLoader.Load(this);
BreakerButton.OnPressed += _ => OnBreaker?.Invoke();
}
public void SetEntity(EntityUid entity)
{
EntityView.SetEntity(entity);
EntityView.SetEntity(owner.Owner);
BreakerButton.OnPressed += _ => owner.BreakerPressed();
}
public void UpdateState(BoundUserInterfaceState state)