* Use new Subs.CVar helper Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe. This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown. * Fix a bunch of warnings * More warning fixes * Use new DateTime serializer to get rid of ISerializationHooks in changelog code. * Get rid of some more ISerializationHooks for enums * And a little more * Apply suggestions from code review Co-authored-by: 0x6273 <0x40@keemail.me> --------- Co-authored-by: 0x6273 <0x40@keemail.me>
28 lines
714 B
C#
28 lines
714 B
C#
using Content.Client.Message;
|
|
using Content.Shared.Research.Prototypes;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.GameObjects;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.XAML;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Client.MassMedia.Ui;
|
|
|
|
[GenerateTypedNameReferences]
|
|
public sealed partial class MiniArticleCardControl : Control
|
|
{
|
|
public Action? OnDeletePressed;
|
|
public int ArticleNum;
|
|
|
|
public MiniArticleCardControl(string name, string author)
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
|
|
NameLabel.Text = name;
|
|
Author.SetMarkup(author);
|
|
|
|
Delete.OnPressed += _ => OnDeletePressed?.Invoke();
|
|
}
|
|
}
|