Update AnomGen UI (#14872)

This commit is contained in:
James Simonson
2023-04-29 13:53:56 +08:00
committed by GitHub
parent 7a9adffa1e
commit 8df9c97b60
3 changed files with 27 additions and 8 deletions

View File

@@ -1,13 +1,13 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc 'anomaly-generator-ui-title'}"
MinSize="270 180"
SetSize="360 180">
<BoxContainer Margin="10 0 10 0"
Resizable="False">
<BoxContainer Margin="0 0"
Orientation="Vertical"
HorizontalExpand="True"
VerticalExpand="True">
<BoxContainer Orientation="Horizontal">
<BoxContainer Margin="10 0 10 0" Orientation="Horizontal">
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
<BoxContainer Orientation="Horizontal"
HorizontalExpand="True"
@@ -30,6 +30,7 @@
<RichTextLabel Name="CooldownLabel" StyleClasses="StatusFieldTitle" />
<RichTextLabel Name="ReadyLabel" StyleClasses="StatusFieldTitle" />
</BoxContainer>
<!--Sprite View-->
<PanelContainer Margin="12 0 0 0"
StyleClasses="Inset"
VerticalAlignment="Center">
@@ -40,9 +41,22 @@
</BoxContainer>
<BoxContainer VerticalExpand="True"
HorizontalAlignment="Center"
VerticalAlignment="Center">
VerticalAlignment="Center"
Margin="0 10">
<Button Name="GenerateButton"
Text="{Loc 'anomaly-generator-generate'}"></Button>
</BoxContainer>
<!-- Footer -->
<BoxContainer Orientation="Vertical">
<PanelContainer StyleClasses="LowDivider" />
<BoxContainer Orientation="Horizontal" Margin="10 2 5 0" VerticalAlignment="Bottom">
<Label Text="{Loc 'anomaly-generator-flavor-left'}" StyleClasses="WindowFooterText" />
<Label Text="{Loc 'anomaly-generator-flavor-right'}" StyleClasses="WindowFooterText"
HorizontalAlignment="Right" HorizontalExpand="True" Margin="0 0 5 0" />
<TextureRect StyleClasses="NTLogoDark" Stretch="KeepAspectCentered"
VerticalAlignment="Center" HorizontalAlignment="Right" SetSize="19 19"/>
</BoxContainer>
</BoxContainer>
</BoxContainer>
</controls:FancyWindow>

View File

@@ -25,6 +25,7 @@ public sealed partial class AnomalyGeneratorWindow : FancyWindow
IoCManager.InjectDependencies(this);
EntityView.Sprite = _entityManager.GetComponent<SpriteComponent>(gen);
EntityView.SpriteOffset = false;
GenerateButton.OnPressed += _ => OnGenerateButtonPressed?.Invoke();
}

View File

@@ -24,15 +24,19 @@ anomaly-scanner-particle-unstable = - [color=plum]Unstable type:[/color] {$type}
anomaly-scanner-particle-containment = - [color=goldenrod]Containment type:[/color] {$type}
anomaly-scanner-pulse-timer = Time until next pulse: [color=gray]{$time}[/color]
anomaly-generator-ui-title = anomaly generator
anomaly-generator-ui-title = Anomaly Generator
anomaly-generator-fuel-display = Fuel:
anomaly-generator-cooldown = Cooldown: [color=gray]{$time}[/color]
anomaly-generator-no-cooldown = Cooldown: [color=gray]Complete[/color]
anomaly-generator-yes-fire = Status: [color=forestgreen]Ready[/color]
anomaly-generator-no-fire = Status: [color=crimson]Not ready[/color]
anomaly-generator-generate = Generate Anomaly
anomaly-generator-charges = {$charges ->
anomaly-generator-charges = {$charges ->
[one] {$charges} charge
*[other] {$charges} charges
}
anomaly-generator-announcement = An anomaly has been generated!
anomaly-generator-announcement = An anomaly has been generated!
# Flavor text on the footer
anomaly-generator-flavor-left = Anomaly may spawn inside the operator.
anomaly-generator-flavor-right = v1.1