Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Drawablebase

Classes

Class: Drawablebase

Extends Uibounds, Uiobject

Drawablebase

A Drawablebase is the most basic type of drawable. It supports visibility, color, rotation, and sRGB settings. Many other drawables like DrawableDDS and ColorDrawable inherit from this base class.

Method: IsVisible

(method) Drawablebase:IsVisible()
  -> visible: boolean

Returns a boolean indicating if the Drawablebase is visible.

@return visibletrue if the Drawablebase is visible, false otherwise.

Method: SetVisible

(method) Drawablebase:SetVisible(visible: boolean)

Shows or hides the Drawablebase.

@param visibletrue to show, false to hide. (default: true)

Method: SetVisibleForString

(method) Drawablebase:SetVisibleForString(minValue: string, maxValue: string, value: string)

Sets the visibility condition based on a string value range.

@param minValue — The minimum value for visibility.

@param maxValue — The maximum value for visibility.

@param value — The value to check (value > minValue and value < maxValue).

Method: SetSRGB

(method) Drawablebase:SetSRGB(srgb: boolean)

Enables or disables sRGB for the Drawablebase.

@param srgbtrue to enable sRGB, false to disable.

Method: SetColor

(method) Drawablebase:SetColor(r: number, g: number, b: number, a: number)

Sets the color for the Drawablebase.

@param r — The red color component (min: 0, max: 1).

@param g — The green color component (min: 0, max: 1).

@param b — The blue color component (min: 0, max: 1).

@param a — The alpha (opacity) component (min: 0, max: 1).

Method: SetRotation

(method) Drawablebase:SetRotation(angle: number)

Sets the rotation angle of the Drawablebase. Works on ImageDrawable and IconDrawable.

@param angle — The rotation angle in degrees.

Method: Show

(method) Drawablebase:Show(show: boolean)

Shows or hides the Drawablebase. Showing before the all extents and anchors are set can cause issues.

@param showtrue to show, false to hide. (default: true)