Libraries.Interface.Controls.TextStyles.TextStyle Documentation
Inherits from: Libraries.Language.Object
Summary
Actions Summary Table
Actions | Description |
---|---|
Compare(Libraries.Language.Object object) | This action compares two object hash codes and returns an integer. |
Equals(Libraries.Language.Object object) | This action determines if two objects are equal based on their hash code values. |
GetColor() | The GetColor action returns the color of text within the TextStyle. |
GetHashCode() | This action gets the hash code for an object. |
GetHighlight() | The GetHighlight action returns the TextHighlight that is being applied to the area of text that this TextStyle governs. |
GetIndex() | The GetIndex action returns the index that the TextStyle begins at within the text. |
GetSelectionColor() | The GetSelectionColor action returns the color of selected text within the TextStyle. |
GetSize() | The GetSize action returns the number of characters that the TextStyle applies to in the text. |
SetColor(Libraries.Game.Graphics.Color color) | The SetColor action sets the color of text within the TextStyle. |
SetHighlight(Libraries.Interface.Controls.TextStyles.TextHighlight highlight) | The SetHighlight action sets a TextHighlight to be applied to the area of the text that the TextStyle governs. |
SetIndex(integer index) | This action sets the starting index of the TextStyle within the text. |
SetSelectionColor(Libraries.Game.Graphics.Color color) | The SetSelectionColor action sets the color of selected text within the TextStyle. |
SetSize(integer length) | The SetSize action sets the number of characters in the text that the TextStyle applies to. |
Actions Documentation
Compare(Libraries.Language.Object object)
This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.
Example Code
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Example Code
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
GetColor()
The GetColor action returns the color of text within the TextStyle.
Return
Libraries.Game.Graphics.Color: The color of text within the TextStyle.
GetHashCode()
This action gets the hash code for an object.
Example Code
Object o
integer hash = o:GetHashCode()
Return
integer: The integer hash code of the object.
GetHighlight()
The GetHighlight action returns the TextHighlight that is being applied to the area of text that this TextStyle governs. By default, this is undefined.
Return
Libraries.Interface.Controls.TextStyles.TextHighlight: The TextHighlight being applied by this TextStyle.
GetIndex()
The GetIndex action returns the index that the TextStyle begins at within the text.
Return
integer: The global index within the text that the TextStyle begins at.
GetSelectionColor()
The GetSelectionColor action returns the color of selected text within the TextStyle.
Return
Libraries.Game.Graphics.Color: The color of selected text within this TextStyle.
GetSize()
The GetSize action returns the number of characters that the TextStyle applies to in the text.
Return
integer: The size of the TextStyle.
SetColor(Libraries.Game.Graphics.Color color)
The SetColor action sets the color of text within the TextStyle.
Parameters
- Libraries.Game.Graphics.Color: The color of text within the TextStyle.
SetHighlight(Libraries.Interface.Controls.TextStyles.TextHighlight highlight)
The SetHighlight action sets a TextHighlight to be applied to the area of the text that the TextStyle governs.
Parameters
- Libraries.Interface.Controls.TextStyles.TextHighlight: The TextHighlight to apply to the TextStyle.
SetIndex(integer index)
This action sets the starting index of the TextStyle within the text.
Parameters
- integer index: The global index within the text that the TextStyle begins at.
SetSelectionColor(Libraries.Game.Graphics.Color color)
The SetSelectionColor action sets the color of selected text within the TextStyle. Unselected text will instead use the Style's default color via the SetColor action.
Parameters
- Libraries.Game.Graphics.Color: The color to apply to selected text within this TextStyle.
SetSize(integer length)
The SetSize action sets the number of characters in the text that the TextStyle applies to.
Parameters
- integer length: The new size of the TextStyle.