better deconversion (#23315)

* add deconverted window

* show deconverted window when deconverting + remove the role

* webedit ops

* antagonist -> revolutionary

* evil

* oh

* eui ops

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2024-01-14 03:20:35 +00:00
committed by GitHub
parent 6a7f1b2f1f
commit a558b112a1
6 changed files with 93 additions and 10 deletions

View File

@@ -0,0 +1,25 @@
using Content.Client.Eui;
namespace Content.Client.Revolutionary.UI;
public sealed class DeconvertedEui : BaseEui
{
private readonly DeconvertedMenu _menu;
public DeconvertedEui()
{
_menu = new DeconvertedMenu();
}
public override void Opened()
{
_menu.OpenCentered();
}
public override void Closed()
{
base.Closed();
_menu.Close();
}
}

View File

@@ -0,0 +1,10 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc 'rev-deconverted-title'}">
<BoxContainer Orientation="Vertical" Margin="5">
<Label Text="{Loc 'rev-deconverted-text'}"/>
<BoxContainer Orientation="Horizontal" Align="Center">
<Button Name="ConfirmButton" Text="{Loc 'rev-deconverted-confirm'}"/>
</BoxContainer>
</BoxContainer>
</controls:FancyWindow>

View File

@@ -0,0 +1,16 @@
using Content.Client.UserInterface.Controls;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.XAML;
namespace Content.Client.Revolutionary.UI;
[GenerateTypedNameReferences]
public sealed partial class DeconvertedMenu : FancyWindow
{
public DeconvertedMenu()
{
RobustXamlLoader.Load(this);
ConfirmButton.OnPressed += _ => Close();
}
}