Skip to content

Gspot functions

trubblegum edited this page Apr 12, 2012 · 13 revisions
Gspot:load()
Module constructor. Returns an instance of Gspot.
Gspot:update(dt)
Called from love.update(dt)
Gspot:draw()
Called from love.draw()
Gspot:mousepress(x, y, button)
Called from love.mousepressed(x, y, button)
Gspot:mouserelease(x, y, button)
Called from love.mouserelease(x, y, button)
Gspot:keypress(key, code)
Called from love.keypressed(key, code)
Gspot:getmouse()
Used by Gspot to retrieve the mouse's position in all cases except Gspot.mousepressed and Gspot.mousereleased. Defaults to return love.mouse.getPosition().
Gspot:clone(tab)
Returns a reference to a deep clone of tab with false values omitted, and metatables copied from tab.
Gspot.getindex(tab, val)
Returns the index in tab at which val is found, or False.
Gspot:add(element)
Fills out an element, and inserts it in Gspot.elements
Gspot:rem(element)
Removes element from Gspot.elements, and element heirarchy.
Gspot:setfocus(element)
Gives element focus, allowing it to accept keyboard input.

Called by element:focus()

Gspot:unfocus()
Clears focus.
Gspot:scrollvalues()
Returns a new scrollvalues table based on supplied parameters. See Gspot Types

Called by Gspot.scroll()