-
Notifications
You must be signed in to change notification settings - Fork 73
Sdl EventTable
Tangent 128 edited this page Mar 28, 2015
·
3 revisions
- Event
- Table
- SYNOPSIS
- FIELDS
- WindowEvent
- KeyDown, KeyUp
- TextEditing
- TextInput
- MouseMotion
- MouseButtonDown, MouseButtonUp
- MouseWheel
- JoyAxisMotion
- JoyBallMotion
- JoyHatMotion
- JoyButtonDown, JoyButtonUp
- JoyDeviceAdded, JoyDeviceRemoved
- Table
This is the table used for handling events. Fields are dynamically set depending on the type of event.
local event = {
type,
...
}
- type, the type of the event (see SDL.event)
- ..., the other fields defined for the specific event type
- windowID, the window id
- event, the type of window event (see SDL.eventWindow)
- windowID, the window id
- state, the button state
- repeat, the repeat state
-
keysym, a table
- scancode, the scancode (see SDL.scancode)
- sym, the key symbol (see SDL.key)
- mod, a table enumeration (see SDL.keymod)
- windowID, the window id
- text, the text as string
- start, the location to begin editing from as integer
- length, length of text as integer
- windowID, the window id
- text, the UTF-8 string text
- windowID, the window id
- x, x coordinate, relative to window
- y, y coordinate, relative to window
- xrel, relative motion in the x direction
- yrel, relative motion in the y direction
- which, the instance id
- state, a table enumeration of all buttons pressed (see [[SDL-MouseMask|SDL.mouseMask)
- windowID, the window id
- x, x coordinate, relative to window
- y, y coordinate, relative to window
- button, the mouse button (see SDL.mouseButton)
- state, true if pressed
- windowID, the window id
- which, which wheel
- x, the amount scrolled horizontally
- y, the amount scrolled vertically
- which, the joystick id
- axis, the axis index number
- value, the value (from -32768 to 32767)
- which, the joystick id
- ball, the ball number
- xrel, the relative motion in the x direction
- yrel, the relative motion in the y direction
- which, the joystick id
- hat, the hat number
- value, the value (see SDL.joyHat)
- which, the joystick id
- button, the button number
- state, the state as boolean
- which, the joystick id which has been added or removed