-
Notifications
You must be signed in to change notification settings - Fork 20
utils.lua
Love Frames utils.lua houses various functions, most of which are meant for internal use.
Sets the active skin
loveframes.SetActiveSkin(name[string])Gets the active skin
Returns 1 value: active skin [string]
local activeskin = loveframes.GetActiveSkin()Used to check for collisions of two rectangles
Note: I take no credit for this function
Returns 1 value: collision [boolean]
local col = loveframes.BoundingBox(x1, x2, y1, y2, w1, w2, h1, h2)Get what objects the mouse cursor is colliding with
Returns 1 value: objects [table]
local cols = loveframes.GetCollisions(object, t)Gets all active Love Frames objects
Returns 1 value: objects [table]
local objects = loveframes.GetAllObjects(object, t)Gets the contents of a directory recursively
Returns 1 value: directory contents [table]
local contents = loveframes.GetDirectoryContents(dir, t)Used to round numbers
Note: I take no credit for this function
Returns 1 value: rounded number [number]
local roundednumber = loveframes.Round(num, idp)Splits a string into a table by the given pattern
Note: I take no credit for this function
Returns 1 value: table [table]
local table = loveframes.SplitString(str, pat)Removes all active Love Frames objects
loveframes.RemoveAll()Checks to see if a table has a specific key
Returns 1 value: haskey [boolean]
local haskey = loveframes.TableHasKey(table, key)Displays an error message as a Love Frames error
loveframes.Error(message)Gets the total number Love Frames objects colliding with the mouse
Returns 1 value: collisioncount [number]
local colcount = loveframes.GetCollisionCount()Returns true if the mouse is colliding with a visible Love Frames objetct, false if not
Returns 1 value: hover [boolean]
local hover = loveframes.GetHover()Checks for collisions between two rectangles
Returns 1 value: collision [boolean]
local col = loveframes.RectangleCollisionCheck(rect1[table], rect2[table])Copies a table
Returns 1 value: newtable [table]
local newtable = loveframes.DeepCopy(original_table[table])