diff --git a/Overview.md b/Overview.md index beefa99..b484e3a 100644 --- a/Overview.md +++ b/Overview.md @@ -13,12 +13,27 @@ dofile("Singe/Framework.singe") -- Declare any global variables you need here. 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 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 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 function onKeyPressed(key, scancode) @@ -28,16 +43,32 @@ function onKeyReleased(key, scancode) end 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 function onOverlayUpdate() - return(OVERLAY_UPDATED) -- Or OVERLAY_NOT_UPDATED if no drawing was done. + --[[ + 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. end function onShutdown() + -- Called when the user exits your game. Free loaded resources here. end -function onSoundCompleted(channel) +function onSoundCompleted(id) + -- The sound "id" just finished playing. end -- Note: There is no "onStartup" event.