Class MultiFormatTextLabel
A multi-format text label supporting variable pixel fonts and layouts.
Designed for Daggerfall's formatted text records such as books and status popups.
This class will be improved over time as needed.
Inheritance
MultiFormatTextLabel
Assembly: Assembly-CSharp.dll
Syntax
public class MultiFormatTextLabel : BaseScreenComponent, IDisposable
Properties
|
Improve this Doc
View Source
ActualTextHeight
Declaration
public int ActualTextHeight { get; }
Property Value
|
Improve this Doc
View Source
Gets or sets extra leading between rows.
Declaration
public int ExtraLeading { get; set; }
Property Value
|
Improve this Doc
View Source
Font
Declaration
public DaggerfallFont Font { get; set; }
Property Value
|
Improve this Doc
View Source
HighlightColor
Declaration
public Color HighlightColor { get; set; }
Property Value
|
Improve this Doc
View Source
LineCount
Declaration
public int LineCount { get; }
Property Value
|
Improve this Doc
View Source
LineHeight
Declaration
public int LineHeight { get; }
Property Value
|
Improve this Doc
View Source
MaxTextHeight
Declaration
public int MaxTextHeight { get; set; }
Property Value
|
Improve this Doc
View Source
MaxTextWidth
Declaration
public int MaxTextWidth { get; set; }
Property Value
|
Improve this Doc
View Source
MinTextureDimTextLabel
used to set min texture dims of textlabel to higher values if there would be aspect or scaling issues with small texts otherwise (e.g. some single-lined textlabels in inventory infopanel)
Declaration
public int MinTextureDimTextLabel { get; set; }
Property Value
|
Improve this Doc
View Source
ShadowColor
Declaration
public Color ShadowColor { get; set; }
Property Value
|
Improve this Doc
View Source
ShadowPosition
Declaration
public Vector2 ShadowPosition { get; set; }
Property Value
|
Improve this Doc
View Source
TextAlignment
Declaration
public HorizontalAlignment TextAlignment { get; set; }
Property Value
|
Improve this Doc
View Source
TextColor
Declaration
public Color TextColor { get; set; }
Property Value
|
Improve this Doc
View Source
TextLabels
Declaration
public List<TextLabel> TextLabels { get; }
Property Value
|
Improve this Doc
View Source
TextScale
set text scale factor - 1.0f is default value, 0.5f is half sized text, 2.0f double sized text and so on
Declaration
public float TextScale { get; set; }
Property Value
|
Improve this Doc
View Source
WrapText
Declaration
public bool WrapText { get; set; }
Property Value
|
Improve this Doc
View Source
WrapWords
Declaration
public bool WrapWords { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
AddTextLabel(String, DaggerfallFont, Color)
Adds a single text item.
Each subsequent text item will be appended to the previous text item position.
Call NewLine() to start a new line.
Declaration
public TextLabel AddTextLabel(string text, DaggerfallFont font, Color color)
Parameters
Type |
Name |
Description |
String |
text |
Text for this label.
|
DaggerfallFont |
font |
Font for this label.
|
Color |
color |
Text color for this label.
|
Returns
|
Improve this Doc
View Source
ChangeScrollPosition(Int32)
Declaration
public void ChangeScrollPosition(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
|
Improve this Doc
View Source
Clear()
Declaration
|
Improve this Doc
View Source
Draw()
Declaration
public override void Draw()
Overrides
|
Improve this Doc
View Source
NewLine()
Declaration
|
Improve this Doc
View Source
ResizeY(Single)
Declaration
public void ResizeY(float newSize)
Parameters
Type |
Name |
Description |
Single |
newSize |
|
|
Improve this Doc
View Source
SetRowLeading(Int32)
Declaration
protected virtual void SetRowLeading(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
|
Improve this Doc
View Source
SetText(TextFile.Token[])
Adds formatted text labels from a RSC token array.
Declaration
public virtual void SetText(TextFile.Token[] tokens)
Parameters
Type |
Name |
Description |
TextFile.Token[] |
tokens |
Daggerfall RSC token array.
|
|
Improve this Doc
View Source
SetText(TextAsset)
Adds formatted text labels from a TextAsset.
Currently only supports newlines, not tabs or other formatting characters.
Declaration
public virtual void SetText(TextAsset textAsset)
Parameters
Type |
Name |
Description |
TextAsset |
textAsset |
Source TextAsset.
|
|
Improve this Doc
View Source
UpdateRestrictedRenderArea()
Declaration
public void UpdateRestrictedRenderArea()