Class TextPage
- Namespace
- RichHudFramework.UI.Client
- Assembly
- RichHudClient.dll
A scrolling page of wrapped, read-only text in the RichHudTerminal.
Useful for help screens, changelogs, or information displays.
public class TextPage : TerminalPageBase, IModRootMember
- Inheritance
-
TextPage
- Implements
- Inherited Members
Examples
This example creates a TextPage configures the headers, and sets a short body example with custom text formatting for a subsection header.
var textPage = new TextPage
{
// Name in sidebar listing
Name = "Text Page Name",
// Contents
HeaderText = "This is a one-line rich text header",
SubHeaderText = "This is a one-line rich text subheader",
Text = new RichText
{
{ "This is a wrapped rich text body that can be arbitrarily long, using default formatting..." },
{ "\n\nThis is a subsection header", GlyphFormat.White
.WithColor(Color.LightGoldenrodYellow)
.WithStyle(FontStyles.Underline) }
}
};
RichHudTerminal.Root.Add(textPage);
Constructors
TextPage()
public TextPage()
Properties
HeaderText
Gets or sets the formatted header text displayed at the top of the page.
public RichText HeaderText { get; set; }
Property Value
SubHeaderText
Gets or sets the formatted subheader text displayed below the header.
public RichText SubHeaderText { get; set; }
Property Value
Text
Gets or sets the main body content of the text page.
public RichText Text { get; set; }
Property Value
TextBuilder
Provides direct access to the underlying text builder for advanced manipulation (e.g., appending, inserting).
public ITextBuilder TextBuilder { get; }