Skip to content

BaseClass

Uladzislau Nikalayevich edited this page Mar 3, 2020 · 4 revisions

Values

{
    x = 0, y = 0, -- float, float  position on current render target
    w = 8, h = 8, -- float, float width, height
    p = 1         -- integer layer
} 

Methods

subclass

table newClass = dxGUI.baseClass:subclass( table newClass )
table anotherObject = newClass:subclass( table AnotherNewClass )

setPosition

bool status = object:setPosition( float absoluteX, float absoluteY )

getPosition

float x, float y = object:getPosition( )

setSize

bool status = object:setSize( float width, float height )

getSize

float width, float height = object:getSize( )

setShow

bool status = object:setShow( bool state )

isShow

bool status = object:isShow( )

isOnCursor

bool status = object:isOnCursor( )

setColor

bool status = object:setColor( integer red, integer green, integer blue [, integer alpha = 255 ])
bool status = object:setColor( integer color )

Examples:

object:setColor( 255, 0, 255, 100 )
object:setColor( 0x64FF00FF ) -- is same

getColor

return hex color 0xAARRGGBB AA - alpha, RR - red, GG - green, BB - blue

integer color = object:getColor( )

Clone this wiki locally