-
Notifications
You must be signed in to change notification settings - Fork 2
BaseClass
Uladzislau Nikalayevich edited this page Mar 3, 2020
·
4 revisions
{
x = 0, y = 0, -- float, float position on current render target
w = 8, h = 8, -- float, float width, height
p = 1, -- integer layer
stats = {
}
statusSounds = {
}
}
table newClass = dxGUI.baseClass:subclass( table newClass )
table anotherObject = newClass:subclass( table AnotherNewClass )
bool status = object:setPosition( float absoluteX, float absoluteY )
float x, float y = object:getPosition( )
bool status = object:setSize( float width, float height )
float width, float height = object:getSize( )
bool status = object:setShow( bool state )
bool status = object:isShow( )
bool status = object:isOnCursor( )
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
return hex color 0xAARRGGBB AA - alpha, RR - red, GG - green, BB - blue
integer color = object:getColor( )
bool status = object:setAlpha( float alpha )
integer alpha = object:getAlpha( )
bool status = object:setPostGUI( bool state )
bool status = object:getPostGUI()
table anim_instance = object:addAnim( anim anim [, var var_1, var var_2, ... )
Example:
local anim = Anim.find( 'animname' )
local loadedAnimInstance = object:addAnim( anim, 1000, false )
bool status = object:removeAnim( integer index [, string reason ] )
void object:updateAnims()