Libraries.Interface.Controls.TextStyles.TextStyle Documentation

Inherits from: Libraries.Language.Object

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.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

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.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

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

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

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

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.