Update Overview
parent
840a52f850
commit
a803fff9a8
1 changed files with 33 additions and 2 deletions
33
Overview.md
33
Overview.md
|
@ -13,12 +13,27 @@ dofile("Singe/Framework.singe")
|
||||||
-- Declare any global variables you need here.
|
-- Declare any global variables you need here.
|
||||||
|
|
||||||
function onControllerMoved(axis, value, which)
|
function onControllerMoved(axis, value, which)
|
||||||
|
--[[
|
||||||
|
Reports which controller axis was moved as well as it's current value.
|
||||||
|
(Range: -32768 to 32767) This is used for analog devices. Digial input
|
||||||
|
is handled by onInput and onKey.
|
||||||
|
--]]
|
||||||
end
|
end
|
||||||
|
|
||||||
function onInputPressed(what)
|
function onInputPressed(what)
|
||||||
|
--[[
|
||||||
|
When in keyboard MODE_NORMAL, input events are reported here when the
|
||||||
|
key or button is first depressed. For a full list of keys/buttons/controllers,
|
||||||
|
see Singe/Framework.singe.
|
||||||
|
--]]
|
||||||
end
|
end
|
||||||
|
|
||||||
function onInputReleased(what)
|
function onInputReleased(what)
|
||||||
|
--[[
|
||||||
|
When in keyboard MODE_NORMAL, input events are reported here when the
|
||||||
|
key or button is released. For a full list of keys/buttons/controllers,
|
||||||
|
see Singe/Framework.singe.
|
||||||
|
--]]
|
||||||
end
|
end
|
||||||
|
|
||||||
function onKeyPressed(key, scancode)
|
function onKeyPressed(key, scancode)
|
||||||
|
@ -28,16 +43,32 @@ function onKeyReleased(key, scancode)
|
||||||
end
|
end
|
||||||
|
|
||||||
function onMouseMoved(x, y, xr, yr, which)
|
function onMouseMoved(x, y, xr, yr, which)
|
||||||
|
--[[
|
||||||
|
Called when the mouse is moved.
|
||||||
|
When in SINGLE_MOUSE mode, absolute X & Y values as well as the
|
||||||
|
relative change in position is returned. For MANY_MOUSE mode, only
|
||||||
|
the relative change is available as well as which mouse was moved.
|
||||||
|
--]]
|
||||||
end
|
end
|
||||||
|
|
||||||
function onOverlayUpdate()
|
function onOverlayUpdate()
|
||||||
|
--[[
|
||||||
|
This is the only place you can safely perform drawing operations!
|
||||||
|
If you wish to display a targeting cursor, you will need to save the
|
||||||
|
mouse position from onMouseMoved in global variables and then use those
|
||||||
|
here to render the cursor.
|
||||||
|
--]]
|
||||||
|
|
||||||
|
-- Tell Singe if we changed the display or not.
|
||||||
return(OVERLAY_UPDATED) -- Or OVERLAY_NOT_UPDATED if no drawing was done.
|
return(OVERLAY_UPDATED) -- Or OVERLAY_NOT_UPDATED if no drawing was done.
|
||||||
end
|
end
|
||||||
|
|
||||||
function onShutdown()
|
function onShutdown()
|
||||||
|
-- Called when the user exits your game. Free loaded resources here.
|
||||||
end
|
end
|
||||||
|
|
||||||
function onSoundCompleted(channel)
|
function onSoundCompleted(id)
|
||||||
|
-- The sound "id" just finished playing.
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Note: There is no "onStartup" event.
|
-- Note: There is no "onStartup" event.
|
||||||
|
|
Loading…
Add table
Reference in a new issue