ScrollingText Class
Namespace: Stride.UI.ControlsAssembly: Stride.UI.dll
A text viewer that scrolls automatically the text from right to left.
[DataContract("ScrollingText")]
public class ScrollingText : TextBlock, IUIElementUpdate, IUIElementChildren, IIdentifiable
Name | Description | |
---|---|---|
Constructors | ||
ScrollingText() | ||
Properties | ||
AccumulatedWidth | The total accumulated width of the scrolling text since the last call the Stride.UI.Controls.ScrollingText.ResetDisplayingText |
|
DesiredCharacterNumber | Gets or sets the desired number of character in average to display at a given time. This value is taken in account during the measurement stage of the element. |
|
RepeatText | Gets or sets the a value indicating if the text message must be repeated (wrapped) or not. |
|
ScrollingOffset | The current offset of the text in the Ox axis. |
|
ScrollingSpeed | Gets or sets the scrolling speed of the text. The unit is in virtual pixels. |
|
TextToDisplay | ||
Methods | ||
AppendText(String) | Append the provided text to the end of the current Text without restarting the display to the begin of the Text. |
|
ArrangeOverride(Vector3) | ||
ClearText() | Clear the currently scrolling text. |
|
MeasureOverride(Vector3) | ||
MeasureSize() | Measure the size of the ScrollingText element. |
|
OnTextChanged() | ||
Update(GameTime) |
Constructors
ScrollingText()
public ScrollingText()
Properties
AccumulatedWidth
The total accumulated width of the scrolling text since the last call the Stride.UI.Controls.ScrollingText.ResetDisplayingText
public float AccumulatedWidth { get; }
Property Value
Type | Description |
---|---|
System.Single |
DesiredCharacterNumber
Gets or sets the desired number of character in average to display at a given time. This value is taken in account during the measurement stage of the element.
[DataMember]
[Display(null, "Behavior")]
public uint DesiredCharacterNumber { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
RepeatText
Gets or sets the a value indicating if the text message must be repeated (wrapped) or not.
[DataMember]
[Display(null, "Behavior")]
public bool RepeatText { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ScrollingOffset
The current offset of the text in the Ox axis.
public float ScrollingOffset { get; }
Property Value
Type | Description |
---|---|
System.Single |
ScrollingSpeed
Gets or sets the scrolling speed of the text. The unit is in virtual pixels.
[DataMember]
[DataMemberRange(0, 3)]
[Display(null, "Behavior")]
public float ScrollingSpeed { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
The value is coerced in the range [0, System.Single.MaxValue].
TextToDisplay
public override string TextToDisplay { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
| Improve this Doc View SourceMethods
AppendText(String)
Append the provided text to the end of the current Text without restarting the display to the begin of the Text.
public void AppendText(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text to append |
ArrangeOverride(Vector3)
protected override Vector3 ArrangeOverride(Vector3 finalSizeWithoutMargins)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | finalSizeWithoutMargins |
Returns
Type | Description |
---|---|
Vector3 |
Overrides
ClearText()
Clear the currently scrolling text.
public void ClearText()
MeasureOverride(Vector3)
protected override Vector3 MeasureOverride(Vector3 availableSizeWithoutMargins)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | availableSizeWithoutMargins |
Returns
Type | Description |
---|---|
Vector3 |
Overrides
MeasureSize()
Measure the size of the ScrollingText element.
public Vector3 MeasureSize()
Returns
Type | Description |
---|---|
Vector3 | The size of the element |
OnTextChanged()
protected override void OnTextChanged()
Overrides
Update(GameTime)
protected override void Update(GameTime time)
Parameters
Type | Name | Description |
---|---|---|
GameTime | time |