Löve Frames - The Util Library
Return to Index
Information
The Love Frames util library houses various functions, most of which are meant for internal use by Love Frames only.
Functions
SetActiveSkin - Sets the active skin
- Returns 1 value: active skin [string]
- Returns 1 value: collision [boolean]
- Note: I take no credit for this function
- Returns 1 value: objects [table]
- Returns 1 value: objects [table]
- Returns 1 value: directory contents [table]
- Returns 1 value: rounded number [number]
- Note: I take no credit for this function
- Returns 1 value: table [table]
- Note: I take no credit for this function
- Returns 1 value: haskey [boolean]
- Returns 1 value: collisioncount [number]
- Returns 1 value: hover [boolean]
- Returns 1 value: collision [boolean]
- Returns 1 value: newtable [table]
- Returns 1 value: hasvalue [bool]
- Returns 1 value: hoverobject [object or bool]
- Note: This function will return false if there is currently no hover object
loveframes.util.SetActiveSkin(name[string])GetActiveSkin - Gets the active skin
- Returns 1 value: active skin [string]
local activeskin = loveframes.util.GetActiveSkin()BoundingBox - Used to check for collisions of two rectangles
- Returns 1 value: collision [boolean]
- Note: I take no credit for this function
local col = loveframes.util.BoundingBox(x1, x2, y1, y2, w1, w2, h1, h2)GetCollisions - Get what objects the mouse cursor is colliding with
- Returns 1 value: objects [table]
local cols = loveframes.util.GetCollisions(object, t)GetAllObjects - Gets all active Love Frames objects
- Returns 1 value: objects [table]
local objects = loveframes.util.GetAllObjects(object, t)GetDirectoryContents - Gets the contents of a directory recursively
- Returns 1 value: directory contents [table]
local contents = loveframes.util.GetDirectoryContents(dir, t)Round - Used to round numbers
- Returns 1 value: rounded number [number]
- Note: I take no credit for this function
local roundednumber = loveframes.util.Round(num, idp)SplitString - Splits a string into a table by the given pattern
- Returns 1 value: table [table]
- Note: I take no credit for this function
local table = loveframes.util.SplitString(str, pat)RemoveAll - Removes all active Love Frames objects
loveframes.util.RemoveAll()TableHasKey - Checks to see if a table has a specific key
- Returns 1 value: haskey [boolean]
local haskey = loveframes.util.TableHasKey(table, key)Error - Displays an error message as a Love Frames error
loveframes.util.Error(message)GetCollisionCount - Gets the total number Love Frames objects colliding with the mouse
- Returns 1 value: collisioncount [number]
local colcount = loveframes.util.GetCollisionCount()GetHover - Returns true if the mouse is colliding with a visible Love Frames objetct, false if not
- Returns 1 value: hover [boolean]
local hover = loveframes.util.GetHover()RectangleCollisionCheck - Checks for collisions between two rectangles
- Returns 1 value: collision [boolean]
local col = loveframes.util.RectangleCollisionCheck(rect1[table], rect2[table])DeepCopy - Copies a table
- Returns 1 value: newtable [table]
local newtable = loveframes.util.DeepCopy(original_table[table])TableHasValue - Returns true if the table has the specified value, false otherwise
- Returns 1 value: hasvalue [bool]
local hasvalue = loveframes.util.TableHasValue(t[table], value[any])GetHoverObject - Gets the current hoverobject
- Returns 1 value: hoverobject [object or bool]
- Note: This function will return false if there is currently no hover object
local hoverobject = loveframes.util.GetHoverObject()