CONTROL

CONTROL is the class for Lua objects that represent Storyboard control model objects. CONTROL extends DOMOBJECT so objects of this type can also invoke all the functions of DOMOBJECT. In Lua, this class is called gredom#control.

CONTROL:get_x

CONTROL:get_x()

Get the value of grd_x for this control.

Returns: The grd_x value of this control

CONTROL:get_y

CONTROL:get_y()

Get the value of grd_y for this control.

Returns: The grd_y value of this control

CONTROL:get_width

CONTROL:get_width()

Get the value of grd_width for this control.

Returns: The grd_width value of this control

CONTROL:get_height

CONTROL:get_height()

Get the value of grd_height for this control.

Returns: The grd_height value of this control

CONTROL:get_position

CONTROL:get_position()

Get the value of grd_x and grd_y for this control.

Returns: The grd_x value of this control The grd_y value of this control

CONTROL:get_size

CONTROL:get_size()

Get the value of grd_width and grd_height for this control.

Returns: The grd_width value of this control The grd_height value of this control

CONTROL:get_hidden

CONTROL:get_hidden()

Get the value of grd_hidden for this control.

Returns: The grd_hidden value of this control

CONTROL:get_bounds

CONTROL:get_bounds()

Get the value of grd_x, grd_y, grd_width and grd_height for this control.

Returns: The grd_x value of this control The grd_y value of this control The grd_width value of this control The grd_height value of this control

CONTROL:set_x

CONTROL:set_x( 
    x
)

Set the value of grd_x for this control to the provided value.

Parameters: x An integer value to set to grd_x of this control

CONTROL:set_y

CONTROL:set_y(
    y
)

Set the value of grd_y for this control to the provided value.

Parameters: y An integer value to set to grd_y of this control

CONTROL:set_height

CONTROL:set_height(
    height
)

Set the value of grd_height for this control to the provided value

Parameters: height An integer value to set to grd_height of this control

CONTROL:set_width

CONTROL:set_width(
    width
)

Set the value of grd_width for this control to the provided value

Parameters: width An integer value to set to grd_width of this control

CONTROL:set_position

CONTROL:set_position(
    x,
    y
)

Set the value of grd_x and grd_y for this control to the provided values

Parameters: x An integer value to set to grd_x of this control y An integer value to set to grd_y of this control

CONTROL:set_size

CONTROL:set_size(
    width,
    height
)

Set the value of grd_width and grd_height for this control to the provided values

Parameters: width An integer value to set to grd_width of this control height An integer value to set to grd_height of this control

CONTROL:set_bounds

CONTROL:set_bounds(
    x,
    y,
    width,
    height
)

Set the value of grd_x, grd_y, grd_width and grd_height for this control to the provided values

Parameters: x An integer value to set to grd_x of this control y An integer value to set to grd_y of this control width An integer value to set to grd_width of this control height An integer value to set to grd_height of this control

CONTROL:set_hidden

CONTROL:set_hidden(
    hidden
)

Set the value of grd_hidden to the provided value.

Parameters: hidden An integer value to set to grd_hidden of this control

CONTROL:hide

CONTROL:hide()

Set the value of grd_hidden for this control to 1.

CONTROL:show

CONTROL:show()

Set the value of grd_hidden for this control to 0.

CONTROL:clone

CONTROL:clone(
    new_object_name,
    parent_name,
    data
)

Create a new control (new_object_name), within an existing parent layer or group (parent_name) by copying all of the properties of this control. This new object will have all of the same actions, variables and it's current state will match the state of this control.

  • Controls and tables can be cloned into either layer or group parents as long as no name conflict exists.

The data argument is a table of properties that match the properties for that type of object as described in the gre.set_control_attrs or gre.set_table_attrs functions as applicable.

Parameters: new_object_name The name for the new object, this must be a unique name in the parents namespace parent_name The name of the layer or group to place this object within, this object must exist data Optional: A table containing control attribute tags as the keys with new values to be applied. Returns: A CONTROL object representing the newly created control.

CONTROL:delete

CONTROL:delete()

Delete this control. This function only works on controls that were created as clones of other controls.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.