Ghost UI to XAML and minor cleanup (#4637)
* Remove unused class, clean up XAML * Move GhostGui.cs into UI folder and namespace * GhostTargetWindow to seperate file * GhostTargetWindow to XAML * Center request button * Improve UI, localisation
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
|
||||
namespace Content.Client.Ghost.Roles.UI
|
||||
{
|
||||
public class GhostRoleWindow : SS14Window
|
||||
{
|
||||
protected override void Opened()
|
||||
{
|
||||
base.Opened();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,15 @@
|
||||
<BoxContainer xmlns="https://spacestation14.io"
|
||||
Orientation="Vertical">
|
||||
<RichTextLabel Name="Title" />
|
||||
<BoxContainer Orientation="Horizontal" SeparationOverride="10">
|
||||
<RichTextLabel Name="Description" HorizontalExpand="True" />
|
||||
<Button Name="RequestButton" Text="Request" TextAlign="Center" SizeFlagsHorizontal="ShrinkEnd" />
|
||||
Orientation="Horizontal"
|
||||
SeparationOverride="10"
|
||||
HorizontalExpand="True">
|
||||
<BoxContainer Orientation="Vertical"
|
||||
HorizontalExpand="True">
|
||||
<RichTextLabel Name="Title" />
|
||||
<RichTextLabel Name="Description" />
|
||||
</BoxContainer>
|
||||
<Button Name="RequestButton"
|
||||
Text="{Loc 'ghost-roles-window-request-role-button'}"
|
||||
TextAlign="Center"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center" />
|
||||
</BoxContainer>
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<SS14Window Title="Ghost Roles"
|
||||
xmlns="https://spacestation14.io" MinSize="350 275">
|
||||
<CenterContainer Name="NoRolesMessage" VerticalExpand="True" HorizontalExpand="True">
|
||||
<Label Text="There are currently no available ghost roles." />
|
||||
</CenterContainer>
|
||||
<ScrollContainer HorizontalExpand="True" VerticalExpand="True">
|
||||
<BoxContainer Orientation="Vertical" Name="EntryContainer" HorizontalExpand="True" VerticalExpand="True" />
|
||||
<SS14Window xmlns="https://spacestation14.io"
|
||||
Title="{Loc 'ghost-roles-window-title'}"
|
||||
MinSize="375 275">
|
||||
<Label Name="NoRolesMessage"
|
||||
Text="{Loc 'ghost-roles-window-no-roles-available-label'}"
|
||||
VerticalAlignment="Top" />
|
||||
<ScrollContainer HorizontalExpand="True"
|
||||
VerticalExpand="True">
|
||||
<BoxContainer Orientation="Vertical"
|
||||
Name="EntryContainer"
|
||||
HorizontalExpand="True"
|
||||
VerticalExpand="True">
|
||||
<!-- Ghost role entries are added here by code -->
|
||||
</BoxContainer>
|
||||
</ScrollContainer>
|
||||
|
||||
</SS14Window>
|
||||
|
||||
@@ -12,8 +12,8 @@ namespace Content.Client.Ghost.Roles.UI
|
||||
|
||||
public void ClearEntries()
|
||||
{
|
||||
EntryContainer.DisposeAllChildren();
|
||||
NoRolesMessage.Visible = true;
|
||||
EntryContainer.DisposeAllChildren();
|
||||
}
|
||||
|
||||
public void AddEntry(GhostRoleInfo info)
|
||||
|
||||
Reference in New Issue
Block a user