Class UI.Rectangle

UI Rectangle class.

For drawing rectangles.

Data Structures

.rectangleStrokeOption Rectangle's stroke/border options.
.rectangleOption Rectangle options.

Fields

UI.Rectangle._base The base class.
UI.Rectangle.border The stroke line borders.

Methods

UI.Rectangle:Create () Creates a rectangle.
UI.Rectangle:Show () Shows this rectangle to the screen.
UI.Rectangle:Hide () Hides this rectangle from the screen.
UI.Rectangle:IsVisible () Checks whether this rectangle is visible on the screen.
UI.Rectangle:Set (arg) Sets this rectangle's options.
UI.Rectangle:Get () Gets this rectangle's options.
UI.Rectangle:UpdateStroke () Updates this rectangle's stroke borders based on its options.

Metamethods

UI.Rectangle.__index Base class.


Data Structures

.rectangleStrokeOption
Rectangle's stroke/border options.
  • visible bool Draws rectangle stroke line borders. (default true)
  • size integer Line size. (default 1)
  • r integer Red color composition (Range = 0~255). (optional)
  • g integer Green color composition (Range = 0~255). (optional)
  • b integer Blue color composition (Range = 0~255). (optional)
  • a integer Transparency (Range = 0~255). (default 255)
.rectangleOption
Rectangle options.
  • x integer Coordinate of X on screen. (optional)
  • y integer Coordinate of Y on screen. (optional)
  • width integer Width. (optional)
  • height integer Height. (optional)
  • r integer Red color composition (Range = 0~255). (optional)
  • g integer Green color composition (Range = 0~255). (optional)
  • b integer Blue color composition (Range = 0~255). (optional)
  • a integer Transparency (Range = 0~255). (optional)
  • stroke .rectangleStrokeOption Rectangle stroke line borders option. (optional)

Fields

UI.Rectangle._base
The base class.
  • _base UI.Box
UI.Rectangle.border
The stroke line borders.
  • border UI.Box[]

Methods

UI.Rectangle:Create ()
Creates a rectangle.

Returns:

    UI.Rectangle This rectangle.
UI.Rectangle:Show ()
Shows this rectangle to the screen.

Returns:

    UI.Rectangle This rectangle.
UI.Rectangle:Hide ()
Hides this rectangle from the screen.

Returns:

    UI.Rectangle This rectangle.
UI.Rectangle:IsVisible ()
Checks whether this rectangle is visible on the screen.

Returns:

    bool Returns true if visible. [[function UI.Rectangle:IsVisible ()
UI.Rectangle:Set (arg)
Sets this rectangle's options.

Parameters:

  • arg .rectangleOption The rectangle options to set.

Returns:

    UI.Rectangle This rectangle.
UI.Rectangle:Get ()
Gets this rectangle's options.

Returns:

    .rectangleOption The options table.
UI.Rectangle:UpdateStroke ()
Updates this rectangle's stroke borders based on its options.

Returns:

    UI.Rectangle This rectangle.

Metamethods

UI.Rectangle.__index
Base class.
generated by LDoc 1.4.6 Last updated 2020-06-15 21:15:36