-
Notifications
You must be signed in to change notification settings - Fork 78
(API) Base
The base
object is the base parent of all Löve Frames objects. The base
object is created when Löve Frames is initialized and spans the size of the current window. All of its methods are inherited by every Löve Frames object.
You should not directly manipulate this object unless you know what you are doing.
##SetPos Sets the object's position
Note: If "true" is specified as a second argument then the object will be centered at the given position
object:SetPos(x[number], y[number], center[boolean])
Sets the object's x position
Note: If "true" is specified as a second argument then the object will be centered at the given position
object:SetX(x[number], center[boolean])
Sets the object's y position
Note: If "true" is specified as a second argument then the object will be centered at the given position
object:SetY(y[number], center[boolean])
Gets the object's position
Returns 2 values: object x [number], object y [number]
local x, y = object:GetPos()
Gets the object's x position
Returns 1 values: object x [number]
local x = object:GetX()
Gets the object's y position
Returns 1 values: object y [number]
local y = object:GetY()
Gets the object's static position
Returns 2 values: object static x [number], object static y [number]
local sx, sy = object:GetStaticPosition()
Gets the object's static x position
Returns 1 value: object static x [number]
local sx = object:GetStaticX()
Gets the object's static y position
Returns 1 value: object static y [number]
local sy = object:GetStaticY()
Center's the object in the center of it's parent both vertically and horizontally
object:Center()
Center's the object in the center of it's parent horizontally
object:CenterX()
Center's the object in the center of it's parent vertically
object:CenterY()
Sets the object's size
object:SetSize(width[number], height[number])
Sets the object's width
object:SetWidth(width[number])
Sets the object's height
object:SetHeight(height[number])
Gets the object's size
Returns 2 values: object width[number], object height[number]
local width, height = object:GetSize()
Gets the object's width
Returns 1 value: object width[number]
local width = object:GetWidth()
Gets the object's width
Returns 1 value: object height[number]
local height = object:GetHeight()
Sets whether or not the object is invisble
object:SetVisible(visible[boolean])
Gets whether or not the object is invisble
local visible = object:GetVisble()
Sets the object's parent
object:SetParent(parent[object])
Gets the object's parent
local parent = object:GetParent()
Removes the object
object:Remove()
Restricts the object's ability to be clicked to certain area
Note: This method is used by the object internally. You should not use it unless you know what you are doing.
object:SetClickBounds(x[number], y[number], width[number], height[number])
Gets the object's click boundaries
Returns 1 value: click boundaries [table]
object:SetClickBounds(x[number], y[number], width[number], height[number])
Removes the object's click boundaries
Note: This method is used by the object internally. You should not use it unless you know what you are doing.
object:RemoveClickBounds()
Checks if the object the top most object in a collision table
Note: This method is used by the object internally. You should not use it unless you know what you are doing.
object:IsTopCollision()
Gets the object's base parent
Returns 1 value: base parent [object]
local baseparent = object:GetBaseParent()
Checks to see if the object should be in a hover state or not
Note: This method is used by the object internally. You should not use it unless you know what you are doing.
object:CheckHover()
Gets whether or not the object is in a hover state
Returns 1 value: hover [boolean]
local hover = object:GetHover()
Returns a table of the object's children
Returns 1 value: children [table]
local children = object:GetChildren()
Returns a table of the object's internals
Returns 1 value: internals [table]
local internals = object:GetInternals()
Checks to see if the object is the top most list object
Returns 1 value: is top list [boolean]
local istoplist = object:IsTopList()
Checks to see if the object is the top most child among it's parent's children
Returns 1 value: is top child [boolean]
local istopchild = object:IsTopChild()
Moves the object to the top of it's parent's children
object:MoveToTop()
Sets the object's skin and it's childrens' skin recursively
object:SetSkin(skinname[string])
Gets the object's skin
Returns 1 value: skin [table]
local skin = object:GetSkin()
Gets the object's skin name
Returns 1 value: skin name [string]
local skin_name = object:GetSkinName()
Sets whether or not the object should always update. If set to true, the object will update even when not visible.
object:SetAlwaysUpdate(alwaysupdate[boolean])
Gets whether or not the object should always update
Returns 1 value: always update [boolean]
local alwaysupdate = object:GetAlwaysUpdate()
Sets whether or not the object should retain it's size when another object attempts to re-size it
object:SetRetainSize(retainsize[boolean])
Gets whether or not the object should retain it's size when another object attempts to re-size it
Returns 1 value: retain size [boolean]
local retainsize = object:GetRetainSize()
Gets whether or not the object is active within it's parent's child table
Returns 1 value: active [boolean]
local active = object:IsActive()
Returns a table of the object's parents and it's sub-parents
Returns 1 value: parents [table]
local parents = object:GetParents()
Returns true if the object is the top most internal in it's parent's internals table or false if not
Returns 1 value: top [boolean]
local top = object:IsTopInternal()
Returns true if the object is internal or false if not
Returns 1 value: internal [boolean]
local internal = object:IsInternal()
Gets the type of the object
Returns 1 value: type [string]
local type = object:GetType()
Sets the object's draw order
Note: This method is used by the object internally. You should not use it unless you know what you are doing.
object:SetDrawOrder(draworder[number])
Gets the object's draw order
Returns 1 value: draw order [number]
local draworder = object:GetDrawOrder()
Sets a property on an object
object:SetProperty(name[string], value[not_type_specific])
Gets a property on an object
Returns 1 value: property [number or string or boolean or table or userdata]
local property = object:GetProperty(name)
Centers the object within a rectangular area
object:CenterWithinArea(x[number], y[number], width[number], height[number])
Checks to see if an object is parented within a list object
Returns 2 values: inlist [boolean], list [object or boolean]
Note: The the second value returned is the list that the object is parented to, or false if the object is not in a list
local inlist, list = object:IsInList()
Sets the object's state
object:SetState(state[string])
Gets the object's state
Returns 1 value: state [string]
local state = object:GetState()