- fix: some message for interactions
This commit is contained in:
@@ -7,15 +7,15 @@
|
||||
<BoxContainer Orientation="Vertical" Margin="5 5 5 5">
|
||||
<BoxContainer Orientation="Vertical" Margin="5 20 5 20" HorizontalAlignment="Stretch" HorizontalExpand="True">
|
||||
<BoxContainer HorizontalAlignment="Center" HorizontalExpand="True">
|
||||
<BoxContainer Orientation="Vertical" Margin="5 5 5 5">
|
||||
<SpriteView Name="PerformerView" Margin="5 10 5 15" HorizontalAlignment="Center"/>
|
||||
<BoxContainer Margin="5 5 5 5">
|
||||
<RichTextLabel Name="PerformerDesc"/>
|
||||
<SpriteView Scale="2 2" Name="PerformerView" Margin="5 10 5 15" HorizontalAlignment="Center"/>
|
||||
</BoxContainer>
|
||||
|
||||
<controls1:HighDivider Margin="5 5 5 5"/>
|
||||
|
||||
<BoxContainer Orientation="Vertical" Margin="5 5 5 5">
|
||||
<SpriteView Name="TargetView" Margin="5 10 5 15" HorizontalAlignment="Center"/>
|
||||
<BoxContainer Margin="5 5 5 5">
|
||||
<SpriteView Scale="2 2" Name="TargetView" Margin="5 10 5 15" HorizontalAlignment="Center"/>
|
||||
<RichTextLabel Name="TargerDesc"/>
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
@@ -39,7 +39,7 @@
|
||||
<CheckBox Margin="5 0 5 0" Name="DisCheckbox"/>
|
||||
<Label Margin="5 0 5 0" Text="{Loc 'interaction-hide-unvisible'}"/>
|
||||
</BoxContainer>
|
||||
<Button Margin="5 5 5 5" Text="Update"/>
|
||||
<Button Margin="5 5 5 5" Text="{Loc 'interaction-update'}" Name="UpdateButton"/>
|
||||
|
||||
<ScrollContainer HorizontalExpand="True" VerticalExpand="True">
|
||||
<BoxContainer Orientation="Vertical" Margin="5 20 5 20" Name="Interactions">
|
||||
|
||||
@@ -5,6 +5,7 @@ using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Client._Amour.InteractionPanel.UI;
|
||||
|
||||
@@ -24,6 +25,7 @@ public sealed partial class InteractionPanelWindow : DefaultWindow
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
DisCheckbox.OnPressed += _ => OnUpdateRequired?.Invoke();
|
||||
UpdateButton.OnPressed += _ => OnUpdateRequired?.Invoke();
|
||||
}
|
||||
|
||||
public void AddButton(InteractionEntry entry)
|
||||
@@ -60,6 +62,31 @@ public sealed partial class InteractionPanelWindow : DefaultWindow
|
||||
Groups.Add(prototype.ID,Interactions.ChildCount - 1);
|
||||
}
|
||||
|
||||
var messageUser = new FormattedMessage();
|
||||
if (state.DescUser.Count == 0)
|
||||
{
|
||||
messageUser.AddMarkup($"- {Loc.GetString("interaction-empty")}\n");
|
||||
}
|
||||
|
||||
foreach (var desc in state.DescUser)
|
||||
{
|
||||
messageUser.AddMarkup($"- {Loc.GetString(desc)}\n");
|
||||
}
|
||||
PerformerDesc.SetMessage(messageUser);
|
||||
|
||||
var messageTarget = new FormattedMessage();
|
||||
if (state.DescTarget.Count == 0)
|
||||
{
|
||||
messageTarget.AddMarkup($"- {Loc.GetString("interaction-empty")}\n");
|
||||
}
|
||||
|
||||
foreach (var desc in state.DescTarget)
|
||||
{
|
||||
messageTarget.AddMarkup($"- {Loc.GetString(desc)}\n");
|
||||
}
|
||||
TargerDesc.SetMessage(messageTarget);
|
||||
|
||||
|
||||
TargetView.SetEntity(state.Target);
|
||||
PerformerView.SetEntity(state.Performer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user