diff --git a/Content.Client/DeadSpace/CharacterFlavor/HeadshotExamineWindow.xaml b/Content.Client/DeadSpace/CharacterFlavor/HeadshotExamineWindow.xaml new file mode 100644 index 0000000000000..97c22edc2a135 --- /dev/null +++ b/Content.Client/DeadSpace/CharacterFlavor/HeadshotExamineWindow.xaml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Content.Client/DeadSpace/CharacterFlavor/HeadshotExamineWindow.xaml.cs b/Content.Client/DeadSpace/CharacterFlavor/HeadshotExamineWindow.xaml.cs new file mode 100644 index 0000000000000..ac3f18aa2dc99 --- /dev/null +++ b/Content.Client/DeadSpace/CharacterFlavor/HeadshotExamineWindow.xaml.cs @@ -0,0 +1,58 @@ +using Content.Client.UserInterface.Controls; +using Robust.Client.AutoGenerated; +using Robust.Client.Graphics; +using Robust.Client.UserInterface.XAML; + +namespace Content.Client.DeadSpace.CharacterFlavor; + +[GenerateTypedNameReferences] +public sealed partial class HeadshotExamineWindow : FancyWindow +{ + private readonly HeadshotUIController _controller; + + public HeadshotExamineWindow(HeadshotUIController controller) + { + RobustXamlLoader.Load(this); + _controller = controller; + } + + public void SetHeadshotTexture(OwnedTexture texture) + { + HeadshotLoadingLabel.Visible = false; + HeadshotTexture.Texture = texture; + HeadshotTexture.Visible = true; + HeadshotContainer.Visible = true; + } + + public void SetFlavorText(string flavorText) + { + if (string.IsNullOrWhiteSpace(flavorText)) + { + FlavorTextLabel.SetMessage(Loc.GetString("headshot-no-flavor-text")); + return; + } + FlavorTextLabel.Text = flavorText; + } + + public void ShowLoading() + { + HeadshotContainer.Visible = true; + HeadshotTexture.Visible = false; + HeadshotLoadingLabel.Visible = true; + } + + public void HideLoading() + { + HeadshotLoadingLabel.Visible = false; + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (disposing) + { + if (HeadshotTexture.Texture is OwnedTexture owned) + owned.Dispose(); + } + } +} diff --git a/Content.Client/DeadSpace/CharacterFlavor/HeadshotPanel.xaml b/Content.Client/DeadSpace/CharacterFlavor/HeadshotPanel.xaml new file mode 100644 index 0000000000000..a051dde2e9eb9 --- /dev/null +++ b/Content.Client/DeadSpace/CharacterFlavor/HeadshotPanel.xaml @@ -0,0 +1,93 @@ + + + + + + + + + + +