From 98c47eb9f956d46cb45278837e81299306ed40af Mon Sep 17 00:00:00 2001 From: Kenny Shields Date: Sun, 10 Aug 2014 14:40:30 -0400 Subject: [PATCH] Fix several typos and inconsistencies --- init.lua | 2 +- libraries/util.lua | 20 ++++++++++---------- objects/base.lua | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/init.lua b/init.lua index eca9d3d..511faa3 100644 --- a/init.lua +++ b/init.lua @@ -369,7 +369,7 @@ function loveframes.Create(data, parent) for k, v in pairs(t) do -- current default object local object = validobjects[v.type]:new() - -- indert the object into the table of objects being created + -- insert the object into the table of objects being created table.insert(objects, object) -- parent the new object by default to the base gui object object.parent = loveframes.base diff --git a/libraries/util.lua b/libraries/util.lua index b4a494d..2ce685e 100644 --- a/libraries/util.lua +++ b/libraries/util.lua @@ -45,7 +45,7 @@ function loveframes.util.BoundingBox(x1, x2, y1, y2, w1, w2, h1, h2) end --[[--------------------------------------------------------- - - func: loveframes.util.GetCollisions(object, table) + - func: GetCollisions(object, table) - desc: gets all objects colliding with the mouse --]]--------------------------------------------------------- function loveframes.util.GetCollisions(object, t) @@ -101,7 +101,7 @@ function loveframes.util.GetCollisions(object, t) end --[[--------------------------------------------------------- - - func: loveframes.util.GetAllObjects(object, table) + - func: GetAllObjects(object, table) - desc: gets all active objects --]]--------------------------------------------------------- function loveframes.util.GetAllObjects(object, t) @@ -254,7 +254,7 @@ function loveframes.util.RemoveAll() end --[[--------------------------------------------------------- - - func: loveframes.util.TableHasValue(table, value) + - func: TableHasValue(table, value) - desc: checks to see if a table has a specific value --]]--------------------------------------------------------- function loveframes.util.TableHasValue(table, value) @@ -270,7 +270,7 @@ function loveframes.util.TableHasValue(table, value) end --[[--------------------------------------------------------- - - func: loveframes.util.TableHasKey(table, key) + - func: TableHasKey(table, key) - desc: checks to see if a table has a specific key --]]--------------------------------------------------------- function loveframes.util.TableHasKey(table, key) @@ -280,7 +280,7 @@ function loveframes.util.TableHasKey(table, key) end --[[--------------------------------------------------------- - - func: loveframes.util.Error(message) + - func: Error(message) - desc: displays a formatted error message --]]--------------------------------------------------------- function loveframes.util.Error(message) @@ -290,7 +290,7 @@ function loveframes.util.Error(message) end --[[--------------------------------------------------------- - - func: loveframes.util.GetCollisionCount() + - func: GetCollisionCount() - desc: gets the total number of objects colliding with the mouse --]]--------------------------------------------------------- @@ -301,7 +301,7 @@ function loveframes.util.GetCollisionCount() end --[[--------------------------------------------------------- - - func: loveframes.util.GetHover() + - func: GetHover() - desc: returns loveframes.hover, can be used to check if the mouse is colliding with a visible Love Frames object @@ -325,7 +325,7 @@ function loveframes.util.RectangleCollisionCheck(rect1, rect2) end --[[--------------------------------------------------------- - - func: loveframes.util.DeepCopy(orig) + - func: DeepCopy(orig) - desc: copies a table - note: I take not credit for this function --]]--------------------------------------------------------- @@ -345,7 +345,7 @@ function loveframes.util.DeepCopy(orig) end --[[--------------------------------------------------------- - - func: loveframes.util.GetHoverObject() + - func: GetHoverObject() - desc: returns loveframes.hoverobject --]]--------------------------------------------------------- function loveframes.util.GetHoverObject() @@ -355,7 +355,7 @@ function loveframes.util.GetHoverObject() end --[[--------------------------------------------------------- - - func: loveframes.util.IsCtrlDown() + - func: IsCtrlDown() - desc: checks for ctrl, for use with multiselect, copy, paste, and such. On OS X it actually looks for cmd. --]]--------------------------------------------------------- diff --git a/objects/base.lua b/objects/base.lua index 1e71f6a..931babf 100644 --- a/objects/base.lua +++ b/objects/base.lua @@ -8,7 +8,7 @@ local newobject = loveframes.NewObject("base", "loveframes_object_base") --[[--------------------------------------------------------- - func: initialize() - - desc: intializes the element + - desc: initializes the element --]]--------------------------------------------------------- function newobject:initialize() @@ -407,7 +407,7 @@ end - desc: centers the object in the game window or in its parent if it has one --]]--------------------------------------------------------- -function newobject:Center(area) +function newobject:Center() local base = loveframes.base local parent = self.parent @@ -1018,10 +1018,10 @@ function newobject:SetSkin(name) end --[[--------------------------------------------------------- - - func: GetSkin(name) + - func: GetSkin() - desc: gets the object's skin --]]--------------------------------------------------------- -function newobject:GetSkin(name) +function newobject:GetSkin() local skins = loveframes.skins.available local skinindex = loveframes.config["ACTIVESKIN"]