public static void SetHelpContent(this ScrollBox scrollBox, string topicId, bool includeTitle = false) { if (GameSystems.Help.TryGetTopic(topicId, out var topic)) { scrollBox.SetHelpContent(topic, includeTitle); } else { scrollBox.ClearLines(); } }
public static void SetHelpContent(this ScrollBox scrollBox, D20HelpTopic topic, bool includeTitle = false) { scrollBox.ClearLines(); scrollBox.DontAutoScroll = true; scrollBox.Indent = 15; var firstLine = includeTitle ? topic.Title + "\n\n" : "\n\n"; scrollBox.SetEntries(new List <D20RollHistoryLine> { new(firstLine, new List <D20HelpLink>()), new(topic.Text, topic.Links) });