Files
tbd-station-14/Content.Client/Info/InfoSection.xaml.cs
Winkarst 88dcc831c1 Remove calls to FormattedMessage obsolete methods (#31706)
* Remove FormattedMessage obsolete methods

* Oops
2024-09-01 13:00:53 +02:00

26 lines
698 B
C#

using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Utility;
namespace Content.Client.Info;
[GenerateTypedNameReferences]
public sealed partial class InfoSection : BoxContainer
{
public InfoSection(string title, string text, bool markup = false)
{
RobustXamlLoader.Load(this);
SetText(title, text, markup);
}
public void SetText(string title, string text, bool markup = false)
{
TitleLabel.Text = title;
if (markup)
Content.SetMessage(FormattedMessage.FromMarkupOrThrow(text.Trim()));
else
Content.SetMessage(text);
}
}