This will delete the page "Behaviours"
. Please be certain.
The following behaviours may be set for any element.
See Elements for reserved behaviours.
When overriding a reserved behaviour, use this.Gspot[this.type].behaviour(this)
to retain default functionality, where behaviour
is the behaviour being overridden.
element.update = function(this, dt)
element:update(dt)
every update, or as specified by element.updateinterval
dt
is passed along by the call to Gspot:update(dt)
element.enter = function(this)
element:enter()
when the mouse enters the bounds of element
.element.leave = function(this)
element:leave()
when the mouse leaves the bounds of element
.element.click = function(this, x, y, button)
element:click()
when the element is clicked with the left mouse button.x
, y
, button
passed along by the call to Gspot:mousepress(x, y, button)
element.rclick = function(this)
element.wheelup = function(this, x, y, button)
element:wheelup(x, y, button)
when the mousewheel is scrolled up while over this element.element.wheeldown = function(this, x, y, button)
element:wheeldown(x, y, button)
when the mousewheel is scrolled down while over this element.element.drag = true
element:drop(bucket)
when released.
Gspot.drag
will be a reference to the element while it is being dragged.element.rdrag = true(this)
element.drag = function(this)
element.drag = true
, and element:drag()
will be called every update until released.element.rdrag = function(this)
element.drop = function(this, bucket)
element:drop(bucket)
when this element is dropped.
bucket
is the topmost element under this element, or false.element.rdrop = function(this, bucket)
element.catch = function(this, ball)
element:catch(ball)
when an element is dropped onto this element.
ball
is the element being dropped.element.rcatch = function(this, ball)
element.keypress = function(this, key, code)
element:keypress(key, code)
when a key is pressed while this element has focus.Use Gspot:setfocus(this)
Gspot:unfocus()
to set and clear focus, and Gspot.focus
to get the element which has focus, or false.
key
, code
passed along by the call to Gspot:keypress(key, code)
This will delete the page "Behaviours"
. Please be certain.