Difference between revisions of "SCI Kernel Documentation/Input Functions"
Line 56: | Line 56: | ||
The types of events which may be specified in eventMask are: | The types of events which may be specified in eventMask are: | ||
+ | <blockquote> | ||
{| | {| | ||
|mouseDown ||a mouse button was pressed | |mouseDown ||a mouse button was pressed | ||
Line 77: | Line 78: | ||
|joyUp||a joystick button was released | |joyUp||a joystick button was released | ||
|} | |} | ||
+ | </blockquote> | ||
These event types may be 'or'ed together to request multiple event types. The symbolic value 'allEvents' requests any event type. | These event types may be 'or'ed together to request multiple event types. The symbolic value 'allEvents' requests any event type. |
Revision as of 13:38, 3 December 2015
Input Functions
(Said saidStr)
Checks to see if the parsed input sentence matches the input specified by saidStr. Returns TRUE if the input matched saidStr, FALSE otherwise.
(HaveMouse)
Returns TRUE if the user has a mouse driver installed, FALSE otherwise.
(SetCursor form showOn [x] [y])
Will set the cursor to the one found in the file "cursor.form" and show the cursor if showOn is TRUE. The optional x & y will position the cursor to the given position.
(GetEvent eventMask event)
Checks the input buffer for an input event of type specified by eventMask. Returns FALSE if there are none. If an event exists, it fills in the event record of the event instance whose ID is in event and returns TRUE.
The types of events which may be specified in eventMask are:
mouseDown a mouse button was pressed mouseUp a mouse button was released keyDown a key was pressed keyUp a key was released menuStart the menu request key was hit menuHit a menu item was selected direction a direction event was received saidEvent a Said statement joyDown a joystick button was pressed joyUp a joystick button was released These event types may be 'or'ed together to request multiple event types. The symbolic value 'allEvents' requests any event type.
(GlobalToLocal event)
Convert the coordinates in the event object event from global (screen) to local (window) coordinates. Event coordinates are always returned in global coordinates, so this call is necessary to convert to the coordinates within the current window.
(LocalToGlobal event)
The reverse of GlobalToLocal -- converts the coordinates in event from the local window coordinates to global screen coordinates.
(Parse stringPtr)
Parses the string pointed to by stringPtr and returns TRUE if the kernel could parse the string, FALSE otherwise. The kernel can parse the string if all the words in the string are in the game's vocabulary (the file vocab.000) and the sentence structure is one recognized by the kernel's grammar.
(SetSynonyms regionList)
Lets the kernel known about the synonyms in each region.
(MapKeyToDir flag)
If flag is TRUE(default), direction keys are mapped to direction events, otherwise if FALSE, direction keys are mapped to keyDown events.
- Notes
< Previous: Graphic Screen Functions Next: Menu Functions >