World of Hello
Public Member Functions | Static Public Member Functions | List of all members
element Class Reference

a 2D GUI element. More...

Inheritance diagram for element:
event CreateButton CreateCheckBox CreateContextMenu CreateDropList CreateEditBox CreateImage CreateListBox CreateScrollBar CreateTable CreateText CreateWindow

Public Member Functions

conditional< string, bool > runScript ()
 run the element's script once. More...
 
element setRunScript (bool runScript=true)
 runs the script each frame. More...
 
element setScript (string code)
 set the element's script. More...
 
string getScript ()
 get the current code of the element. More...
 
conditional< string, bool > doScriptString (string code)
 does a script string. More...
 
element blockFunction (string functionName, bool block=true)
 blocks a function from being used outside of the current script. More...
 
string getID ()
 get the ID of the element. More...
 
bool setID (string ID)
 set the ID of the element. More...
 
float getX ()
 get the X axis of the element. More...
 
float getY ()
 get the Y axis of the element. More...
 
float getWidth ()
 get the width of the element. More...
 
float getHeight ()
 get the height of the element. More...
 
element bringToFront ()
 brings the element to the top-most layer. More...
 
element bringToBack ()
 brings the element to the bottom-most layer. More...
 
element setX (float X)
 sets the X axis of the element More...
 
element setY (float Y)
 sets the Y axis of the element. More...
 
element setWidth (float width)
 sets the width of the element. More...
 
element setWidth (float height)
 sets the height of the element. More...
 
element setScale (float scale)
 sets the scale of the element. More...
 
element setScale (float widthScale, float heightScale)
 sets the width and height scale of the element. More...
 
element setMaintainAspectRatio (bool maintainAspectRatio=true)
 sets whether or not changing the width/height maintains aspect ratio scaling. More...
 
element center ()
 centers the element. More...
 
element setScalePosition ()
 sets that setScale() should also scale the element's position. More...
 
element setScalePosition (bool scalePosition)
 sets whether or not setScale() should also scale the element's position. More...
 
element setScalePosition (bool scaleX, bool scaleY)
 sets whether or not setScale() should also scale the element's X and Y position. More...
 
element setCollisionWith (element elem)
 add collision with another element. More...
 
element removeCollisionWith (element elem)
 removes the collision with another element. More...
 
element setMinWidth (float minWidth)
 sets the minimum resize width. More...
 
element setMinHeight (float minHeight)
 sets the minimum resize height. More...
 
element setMaxWidth (float maxWidth)
 sets the maximum resize width. More...
 
element setMaxHeight (float maxHeight)
 sets the maximum resize height. More...
 
string getType ()
 get the type of this element. More...
 
element setPosition (float X, float Y)
 set the position of the element. More...
 
multiReturn< float, float > getPosition ()
 gets the position of the element. More...
 
element setTabEnabled (bool enabled=true)
 sets whether or not you can tab to get to this element. More...
 
element setTabOrder (int orderNo)
 sets the order in which this element can be tabbed to. More...
 
element setClipped (bool clipped)
 sets whether the element should be cut off by it's rectangle. More...
 
element setDPIAware (bool dpiAware=true)
 
element setDefaultControls (bool defaultControls, float speed)
 sets whether the element can be moves with keys. More...
 
element setFocused (bool focused=true)
 set the focus of the element. More...
 
bool isFocused ()
 get whether or not the element is in focus. More...
 
element setMovable (bool movable=true, int movableHeight=-1)
 sets the movability of the element. More...
 
element setMovableBoundaries (int x, int y, int endX, int endY)
 sets the movable boundaries. More...
 
multiReturn< int, int, int, int > getMovableBoundaries ()
 gets the movable boundaries. More...
 
bool hitsBoundary (string direction)
 checks if the element has collided with a boundary. More...
 
element setResizable (bool resizable=true)
 sets whether the element is resizable. More...
 
element setResizableDepth (int resizableDepth)
 sets the depth of the pixels the user must click to resize an element. More...
 
element setRect (int x, int y, int width, int height)
 sets the rectangle of the element. More...
 
element hide ()
 sets the element to be invisible. More...
 
element show ()
 sets the element to be visible. More...
 
element setVisible (bool visible=true)
 sets the visibility of the element. More...
 
bool isVisible ()
 get the visibility of the element. More...
 
element addElement (element elem)
 adds a child element. More...
 
element setParent (element elem)
 adds this element as a child of the given element. More...
 
element removeElement (element elem)
 removes a child element. More...
 
element[] getElements ()
 gets all child elements. More...
 
element getParent ()
 get the parent element. More...
 
element resetLayers ()
 resets the order of the layers. More...
 
void remove ()
 removes the element. More...
 
string getObject (bool includeChildren=true)
 get the element as a total object. More...
 
element doCommands (string cmd)
 creates the element from an object like a server command. More...
 
element removeFromClients ()
 removes the element from all online clients. More...
 
element sendToClients (bool removeOthers=false, string key="", string keyAns="")
 sends the element to all connected clients who meet the criteria. More...
 
element setProperty (string property, string value)
 sets a property of the element to be sent next. More...
 
string getProperty (string property)
 gets the value of a set property. More...
 
string[] getProperties ()
 gets all properties from the object. More...
 
element removeProperty (string property)
 removes a property from the object. More...
 
element clearProperties ()
 removes all properties from the object. See removeProperty() More...
 
bool setParentScript (string scriptPath)
 sets the parent script. More...
 
- Public Member Functions inherited from event
void setEventListener (ElementEvent event, function func,...)
 sets a function to run on the given event. Removes all other event listeners of the same event type. More...
 
void addEventListener (ElementEvent event, function func,...)
 adds a function to run on the given event. More...
 

Static Public Member Functions

static void drawRectangle (int x, int y, int width=100, int height=50, bool border=false, int r=0, int g=0, int b=0, int a=255, clipX=0, clipY=0, clipWidth=game:getWindowWidth(), clipHeight=game:getWindowHeight())
 draws a 2D rectangle on top of the element. More...
 

Detailed Description

a 2D GUI element.

    Elements (such as CreateImage or CreateButton) derive all of the functions in this class.\n
    This means that any element may use these by using something like "elementName:setX(10)".\n
    WARNING: The user must have sufficient access rights to call any functions. These permissions can be set or removed
    using element:blockFunction(). The function may only be unblocked in the same script that it was blocked in.\n
    WARNING: Online elements with an unset ID (or set IDs without a leading '-') are destroyed when the object creator disconnects.

Member Function Documentation

◆ addElement()

element element::addElement ( element  elem)

adds a child element.

   Adds an element to this element.\n
   The child element that is added will always have a position and clip source relative to this element.
Parameters
Theelement to add to this element.
Returns
Returns itself.

◆ blockFunction()

element element::blockFunction ( string  functionName,
bool  block = true 
)

blocks a function from being used outside of the current script.

   After a function is blocked, the function can no longer be used.
   The function may only be unblocked in the same script that blocked the function.\n
   Good for security purposes. For example, if you create a password editbox, and someone has access to other scripts,
   by blocking the element:getText() function, they cannot get the text of the editbox.
Parameters
Thename of the function to be blocked. I.E "getText".
(optional)Whether the function should be blocked or unblocked.
Returns
Returns itself.

◆ bringToBack()

element element::bringToBack ( )

brings the element to the bottom-most layer.

Returns
Returns itself.

◆ bringToFront()

element element::bringToFront ( )

brings the element to the top-most layer.

Returns
Returns itself.

◆ center()

element element::center ( )

centers the element.

Returns
Returns itself.

◆ clearProperties()

element element::clearProperties ( )

removes all properties from the object. See removeProperty()

Returns
Returns itself.

◆ doCommands()

element element::doCommands ( string  cmd)

creates the element from an object like a server command.

   Uses the given comma-separated properties and creates the element like a command.
   You may get the object (see element:getObject()) and use this function to make the element
   load the same data as the given object.\n
   WARNING: children may also be created, if given.
Parameters
Theobject command.
Returns
Returns itself.

◆ doScriptString()

conditional<string, bool> element::doScriptString ( string  code)

does a script string.

   Instead of setting the script to be ran by the element,
   this does the string as a script just one time. Does not change the set script.
Parameters
Thecode the element should run.
Returns
Returns true if the script returned without errors, otherwise the string explaining the error.

◆ drawRectangle()

static void element::drawRectangle ( int  x,
int  y,
int  width = 100,
int  height = 50,
bool  border = false,
int  r = 0,
int  g = 0,
int  b = 0,
int  a = 255,
clipX  = 0,
clipY  = 0,
clipWidth  = game:getWindowWidth(),
clipHeight  = game:getWindowHeight() 
)
static

draws a 2D rectangle on top of the element.

Parameters
TheX axis of the rectangle.
TheY axis of the rectangle.
(optional)The width of the rectangle.
(optional)The height of the rectangle.
(optional)Whether the rectangle is only the border or filled.
(optional)The amount of red (0-255).
(optional)The amount of green (0-255).
(optional)The amount of blue (0-255).
(optional)The amount of alpha (transparency) (0-255).
(optional)The clipping X (the rectangle will not draw pixels lower than the clipping X).
(optional)The clipping Y.
(optional)The clipping width (the rectangle will not draw pixels above the clipping X + the clipping width).
(optional)The clipping height.

◆ getElements()

element [] element::getElements ( )

gets all child elements.

   Returns an array of elements added with the addElement() function.\n
   Returns nil if there are no added elements.
Returns
An array of added elements, if any. Otherwise, nil.

◆ getHeight()

float element::getHeight ( )

get the height of the element.

   Gets the height of the element in pixels.\n
   WARNING: this gets the set height of the element. If you are trying to get the text height of a CreateText element,
   you should instead use CreateText:getTextHeight()
Returns
The height of the element.

◆ getID()

string element::getID ( )

get the ID of the element.

Returns
The ID of the element.

◆ getMovableBoundaries()

multiReturn<int, int, int, int> element::getMovableBoundaries ( )

gets the movable boundaries.

  Gets the boundaries set using setMovableBoundaries(). If no boundaries are set, then returns -1 for all values.
Returns
The starting X, starting Y, ending X, and ending Y values that the element cannot move behind or passed.

◆ getObject()

string element::getObject ( bool  includeChildren = true)

get the element as a total object.

   Gets the element and all of it's set properties as a string object.
   Can be used to save the element into a data file.
Parameters
Whetheror not the children objects should also be returned.
Returns
The element as an object string, and it's children if necessary.

◆ getParent()

element element::getParent ( )

get the parent element.

   Gets the element who added this element (see element:addElement()), if any.
Returns
(1) The parent element who added this element. If no parent, then (2) This element itself.

◆ getPosition()

multiReturn<float, float> element::getPosition ( )

gets the position of the element.

Returns
The X and Y axis of the element.

◆ getProperties()

string [] element::getProperties ( )

gets all properties from the object.

Returns
All properties of the object.

◆ getProperty()

string element::getProperty ( string  property)

gets the value of a set property.

Parameters
Theproperty to get the value of.
Returns
The value of the given property.

◆ getScript()

string element::getScript ( )

get the current code of the element.

Returns
The code set to the script using element:setScript()

◆ getType()

string element::getType ( )

get the type of this element.

   Gets the type of element. For example, if this is a button, the type is "CreateButton".
Returns
The type of the element.

◆ getWidth()

float element::getWidth ( )

get the width of the element.

   Gets the width of the element in pixels.\n
   WARNING: this gets the set width of the element. If you are trying to get the text width of a CreateText element,
   you should instead use CreateText:getTextWidth()
Returns
The width of the element.

◆ getX()

float element::getX ( )

get the X axis of the element.

Returns
The X axis of the element.

◆ getY()

float element::getY ( )

get the Y axis of the element.

Returns
The Y axis of the element.

◆ hide()

element element::hide ( )

sets the element to be invisible.

Returns
Returns itself.

◆ hitsBoundary()

bool element::hitsBoundary ( string  direction)

checks if the element has collided with a boundary.

   If a boundary is set (see element:setMovableBoundaries()), you may check if an element has hit
   a boundary by using this function.\n
   Use element:hitsBoundary("up"), element:hitsBoundary("down"), etc. to check boundary collision.
Parameters
Thedirection of the boundary.
Returns
Whether or not the boundary of the given direction was hit.

◆ isFocused()

bool element::isFocused ( )

get whether or not the element is in focus.

   Gets the focus of the element.\n
   If an element was last clicked, it is in focus.
Returns
Returns if the element is focused.

◆ isVisible()

bool element::isVisible ( )

get the visibility of the element.

   Get whether the element is visible or not.\n
   See element:setVisible(), element:show(), and element:hide() for more information.
Returns
Whether or not the element is visible.

◆ remove()

void element::remove ( )

removes the element.

   Destroys the element, removing it completely.

◆ removeCollisionWith()

element element::removeCollisionWith ( element  elem)

removes the collision with another element.

   Removes the collision from this element with another element.
   Check out element:setCollisionWith() for more information.
Parameters
Theelement to remove collision with.
Returns
Returns itself.

◆ removeElement()

element element::removeElement ( element  elem)

removes a child element.

   Removes an element from this element.\n
   Not to be confused with element::remove(), this function detaches an added element
   using element:addElement().
Parameters
Theelement to remove from this element.
Returns
Returns itself.

◆ removeFromClients()

element element::removeFromClients ( )

removes the element from all online clients.

Todo:
element:removeFromClients() should take criteria for who to remove from.
   Removes the element from all online clients.\n
   WARNING: this does not remove the element from the user.\n
   WARNING: this removes the element entirely from the server.
Returns
Returns itself.

◆ removeProperty()

element element::removeProperty ( string  property)

removes a property from the object.

   Note that setting the property's value to an empty string will also call removeProperty().
Parameters
Theproperty to be removed.
Returns
Returns itself.

◆ resetLayers()

element element::resetLayers ( )

resets the order of the layers.

   Resets the layer ordering. Elements who were created last go on the top layer.
Returns
Returns itself.

◆ runScript()

conditional<string, bool> element::runScript ( )

run the element's script once.

   Runs the script set by element:setScript() one time.
Returns
Returns true if the script returned without errors, otherwise the string explaining the error.

◆ sendToClients()

element element::sendToClients ( bool  removeOthers = false,
string  key = "",
string  keyAns = "" 
)

sends the element to all connected clients who meet the criteria.

   Sends the element to all clients who are connected to this world.\n
   When the element is received, it is caught as a command (see element:doCommands()).\n
   The element is then stored in the server based on it's ID (see element:setID()).
Parameters
(optional)Whether or not all of the object's properties are required to be sent.
(optional)The send key who all clients must have in order to get the object.
(optional)The send key value all clients must also have.
Returns
Returns itself.

◆ setClipped()

element element::setClipped ( bool  clipped)

sets whether the element should be cut off by it's rectangle.

Todo:
element:setClipped() should work for all elements.
   Sets whether or not the element should get cut off (or clipped) due to it's position, width, and height.\n
   For example, if a CreateText element width is less than the CreateText text width, then the text gets cut off.
   By setting clipped to false, the entire text will show regardless of it's width.\n
   Likewise, elements get cut off outside of parent elements (using element:addChild()). Setting clipped to false
   will ensure they don't get cut off.
Parameters
Setswhether or not the element should be clipped.
Returns
Returns itself.

◆ setCollisionWith()

element element::setCollisionWith ( element  elem)

add collision with another element.

Todo:
element:setCollisionWith() pixel collision detection.
   Sets bounding box collision with another element.
   This means that the rectangle around the x, y, width, and height of this element cannot move through the other.\n
   WARNING: the other element may still move through this element if that element does not have a set collision with this element.\n
   WARNING: this does not use pixel-collision. Transparent pixels still collide.\n
Parameters
Theelement that this element collides with.
Returns
Returns itself.

◆ setDefaultControls()

element element::setDefaultControls ( bool  defaultControls,
float  speed 
)

sets whether the element can be moves with keys.

   Sets whether or not the element can be moved using the arrow keys and WSAD keys.\n
   You may also change the movement speed of the element.
Parameters
Whetheror not the element is movable with keys.
Thespeed of the element's movement.
Returns
Returns itself.

◆ setDPIAware()

element element::setDPIAware ( bool  dpiAware = true)

/brief sets whether the element is DPI aware or not.

  True by default, sets whether or not the element should be scaled based on screen density.\n
  DPI-aware elements are elements that remain the same size between all devices and screen monitors.\n
  By disabling DPI-awareness, elements may need to have additional code to accomodate viewing them on different systems, like mobile vs. PC.
Parameters
(optional)Whether or not the element is DPI aware.
Returns
Returns itself.

◆ setFocused()

element element::setFocused ( bool  focused = true)

set the focus of the element.

   Sets whether or not the element is in focus.\n
   See element:isFocused() for more information.
Parameters
(optional)Whether the element should be focused or not.
Returns
Returns itself.

◆ setID()

bool element::setID ( string  ID)

set the ID of the element.

   Sets the ID of the element. By default, the element has a unique ID.\n
   WARNING: If the ID has a minus sign ("-") at the beginning of the new ID to be set,
   the ID will remain static, even for online objects when being sent. Otherwise if there is no minus sign,
   a unique ID will be generated for online objects, and the online object (if sent) will be removed by default on disconnect.\n
   For example, if you want to create an online object only one time total that all clients can see and modify (opposed to one online object per client),
   you may want to add a minus sign to the beginning of the ID. Used in the case of real-time editing game town elements.
Parameters
Thenew ID to be set.
Returns
Returns true if succeeded, otherwise false if there was an ID conflict.

◆ setMaintainAspectRatio()

element element::setMaintainAspectRatio ( bool  maintainAspectRatio = true)

sets whether or not changing the width/height maintains aspect ratio scaling.

Parameters
(optional)Whether or not the element should maintain aspect ratio.
Returns
Returns itself.

◆ setMaxHeight()

element element::setMaxHeight ( float  maxHeight)

sets the maximum resize height.

   If an has a maximum height, it cannot be resized to be larger than that height.
   If it does get resized to above the maximum height, it is instead set to the maximum height.\n
Parameters
Themaximum height to be set.
Returns
Returns itself.

◆ setMaxWidth()

element element::setMaxWidth ( float  maxWidth)

sets the maximum resize width.

   If an has a maximum width, it cannot be resized to be larger than that width.
   If it does get resized to above the maximum width, it is instead set to the maximum width.\n
Parameters
Themaximum width to be set.
Returns
Returns itself.

◆ setMinHeight()

element element::setMinHeight ( float  minHeight)

sets the minimum resize height.

   If an has a minimum height, it cannot be resized to be smaller than that height.
   If it does get resized to below the minimum height, it is instead set to the minimum height.\n
Parameters
Theminimum height to be set.
Returns
Returns itself.

◆ setMinWidth()

element element::setMinWidth ( float  minWidth)

sets the minimum resize width.

   If an has a minimum width, it cannot be resized to be smaller than that width.
   If it does get resized to below the minimum width, it is instead set to the minimum width.\n
Parameters
Theminimum width to be set.
Returns
Returns itself.

◆ setMovable()

element element::setMovable ( bool  movable = true,
int  movableHeight = -1 
)

sets the movability of the element.

   Enables (or disables) the element from being moved using a cursor or finger.\n
   If there are multi-touch events, more than one element can be moved at the same time.\n
   20 by default, if the movableHeight is greater than or equal to 0, it is the height of where the user must drag to move the element.\n
   For example, if the movableHeight is 10, the user must click anywhere above the element's Y axis plus 10.\n
   If the element is also resizable (see element:setResizable()), the movableHeight is cut by the resizableDepth (see element:setResizableDepth()).\n
   The event onElementMove() is triggered when the element is moved.
Parameters
(optional)Whether or not the element is draggable.
(optional)The Y axis that the mouse click above to become dragged.
Returns
Returns itself.

◆ setMovableBoundaries()

element element::setMovableBoundaries ( int  x,
int  y,
int  endX,
int  endY 
)

sets the movable boundaries.

   An element cannot be dragged out of it's movable boundaries.
   If the element is dragged while out of bounds, it will be moved inside of the bounds.
Parameters
Thestarting X axis the element cannot be moved behind.
Thestarting Y axis the element cannot be moved behind.
Theending X axis the element cannot be moved passed.
Theending Y axis the element cannot be moved passed.
Returns
Returns itself.

◆ setParent()

element element::setParent ( element  elem)

adds this element as a child of the given element.

  Adds this element to the given element.\n
  This is the same as addElement(), but is the opposite direction.
Parameters
Theelement to add this element to.
Returns
Returns itself.

◆ setParentScript()

bool element::setParentScript ( string  scriptPath)

sets the parent script.

   Sets the parent script which contains the element. Elements are destroyed when their parent script is removed or modified.\n
   To avoid a temporary script's removal also destroying a created element, you can use this function to move it to a new script.\n
   WARNING: Moving an element to a new script also moves it's callback event functions (onButtonPressed, onResized, etc.) to the new parent script.
Parameters
Thepath of the new parent script.
Returns
Whether or not the element was successful in switching to the new parent script.

◆ setPosition()

element element::setPosition ( float  X,
float  Y 
)

set the position of the element.

   Sets the X and Y position of the element.\n
Parameters
Thenew X axis.
Thenew Y axis.
Returns
Returns itself.

◆ setProperty()

element element::setProperty ( string  property,
string  value 
)

sets a property of the element to be sent next.

   Sets the property to the previous property, and acts like it has been changed.
   This is used in the case that you want to send a property, regardless of it's change status.
   WARNING: Setting the value to an empty string removes the property.
Parameters
Theproperty to be set.
Thevalue of the property.
Returns
Returns itself.

◆ setRect()

element element::setRect ( int  x,
int  y,
int  width,
int  height 
)

sets the rectangle of the element.

   Sets the X axis, Y axis, width, and height of the element.
Parameters
Thenew X axis.
Thenew Y axis.
Thenew width.
Thenew height.
Returns
Returns itself.

◆ setResizable()

element element::setResizable ( bool  resizable = true)

sets whether the element is resizable.

   Sets whether or not the element is resizable.
   The element can be movable and resizable at the same time.
   More than one element may be resized at the same time with multi-touch events,
   but one element can only be resized in one position at once (I.E you cannot resize an element left and right at the same time).\n
   The event onResize is triggered when the element is resized.
Parameters
(optional)Whether the element is resizable.
Returns
Returns itself.

◆ setResizableDepth()

element element::setResizableDepth ( int  resizableDepth)

sets the depth of the pixels the user must click to resize an element.

   Set the depth of the resizable window. If the depth is 5, the user must click on the element, for example,
   at a position of the element's X axis plus 5 or greater than the element's Y axis plus it's height minus 5.
Parameters
Theamount of pixels the user must click out of to resize the element.
Returns
Returns itself.

◆ setRunScript()

element element::setRunScript ( bool  runScript = true)

runs the script each frame.

   Similar to element:runScript(), but always runs the script for each frame if set to true.\n
   Sets the property "runningScript" to the element for sending to clients.
Parameters
(optional)Sets whether the script should be set to run or not.
Returns
Returns itself.

◆ setScale() [1/2]

element element::setScale ( float  scale)

sets the scale of the element.

Parameters
Thenew scale of the element.
Returns
Returns itself.

◆ setScale() [2/2]

element element::setScale ( float  widthScale,
float  heightScale 
)

sets the width and height scale of the element.

Parameters
Thenew scaled width of the element.
Thenew scaled height of the element.
Returns
Returns itself.

◆ setScalePosition() [1/3]

element element::setScalePosition ( )

sets that setScale() should also scale the element's position.

Returns
Returns itself.

◆ setScalePosition() [2/3]

element element::setScalePosition ( bool  scalePosition)

sets whether or not setScale() should also scale the element's position.

Returns
Returns itself.

◆ setScalePosition() [3/3]

element element::setScalePosition ( bool  scaleX,
bool  scaleY 
)

sets whether or not setScale() should also scale the element's X and Y position.

Returns
Returns itself.

◆ setScript()

element element::setScript ( string  code)

set the element's script.

   Set the script to be ran by element:setRunScript() or element:runScript().\n
   Sets the property "script" to the element for sending to clients.
Parameters
Thecode the element should run.
Returns
Returns itself.

◆ setTabEnabled()

element element::setTabEnabled ( bool  enabled = true)

sets whether or not you can tab to get to this element.

   False by default, sets whether this element can be tabbed to or not.
   In order to tab to this element, you must first use element:setTabOrder() for indexing.
Parameters
(optional)Sets whether or not this element can be tabbed to.
Returns
Returns itself.

◆ setTabOrder()

element element::setTabOrder ( int  orderNo)

sets the order in which this element can be tabbed to.

   Indexing starts at 0. If this item is at index 5, it will take 5 tabs to focus this element.
   If the tab order stops at 5, one more tab will bring back to the first element at index 0.\n
   WARNING: by using this function, we do element:setTabEnabled(true) for you.
Parameters
Thenumber of tabs to get to this item.
Returns
Returns itself.

◆ setVisible()

element element::setVisible ( bool  visible = true)

sets the visibility of the element.

Parameters
(optional)The visibility to be set.
Returns
Returns itself.

◆ setWidth() [1/2]

element element::setWidth ( float  height)

sets the height of the element.

Parameters
Thenew height.
Returns
Returns itself.

◆ setWidth() [2/2]

element element::setWidth ( float  width)

sets the width of the element.

Parameters
Thenew width.
Returns
Returns itself.

◆ setX()

element element::setX ( float  X)

sets the X axis of the element

Parameters
Thenew X position.
Returns
Returns itself.

◆ setY()

element element::setY ( float  Y)

sets the Y axis of the element.

Parameters
Thenew Y position.
Returns
Returns itself.

◆ show()

element element::show ( )

sets the element to be visible.

Returns
Returns itself.