inputManagerobject | input.t[65]

Keyboard input manager.

`inputManager : PostRestoreObject`

Superclass Tree (in declaration order)

`inputManager`
`PostRestoreObject`
`ModuleExecObject`
`object`

Summary of Properties

`inProgressDefObj inputEventInProgress inputLineInProgress noInputTimeout`

Inherited from `PostRestoreObject` :
`restoreCode`

Inherited from `ModuleExecObject` :
`execAfterMe execBeforeMe hasInitialized_ isDoingExec_ isExecuted_`

Summary of Methods

`cancelInputInProgress execute getEvent getEventOrKey getInputDialog getInputFile getInputLine getInputLineExt getKey inputBegin inputEventBegin inputEventEnd inputLineBegin inputLineEnd pauseForMore`

``

Inherited from `ModuleExecObject` :
`_execute classExec`

Properties

`inProgressDefObj` | `input.t[577]`

the InputDef object for the input in progress

`inputEventInProgress` | `input.t[580]`

flag: keystroke/event input is in progress

`inputLineInProgress` | `input.t[574]`

Flag: command line input is in progress. If this is set, it means that we interrupted command-line editing by a timeout, so we should not show a prompt the next time we go back to the keyboard for input.

`noInputTimeout` | `input.t[599]`

Flag: inputLine does not support timeouts on the current platform. We set this when we get an InEvtNoTimeout return code from inputLineTimeout, so that we'll know not to try calling again with a timeout. This applies to the current interpreter only, so we must ignore any value restored from a previously saved game, since the game might have been saved on a different platform.

Note that if this value is nil, it means only that we've never seen an InEvtNoTimeout return code from inputLineEvent - it does NOT mean that timeouts are supported locally.

We assume that the input functions are uniform in their treatment of timeouts; that is, we assume that if inputLineTimeout supports timeout, then so does inputEvent, and that if one doesn't support timeout, the other won't either.

Methods

`cancelInputInProgress (reset)` | `input.t[414]`

Cancel input in progress.

If 'reset' is true, we'll clear any input state saved from the interrupted in-progress editing session; otherwise, we'll retain the saved editing state for restoration on the next input.

This MUST be called before calling tadsSay(). Games should generally never call tadsSay() directly (call the library function say() instead), so in most cases authors will not need to worry about calling this on output.

This MUST ALSO be called before performing any keyboard input. Callers using inputManager methods for keyboard operations won't have to worry about this, because the inputManager methods call this routine when necessary.

`execute ( )`OVERRIDDEN | `input.t[543]`

receive post-restore notification

`getEvent (promptFunc?)` | `input.t[291]`

Read an event, processing real-time events while waiting, if desired. 'allowRealTime' and 'promptFunc' work the same way they do with getInputLine().

`getEventOrKey (promptFunc, keyOnly)` | `input.t[306]`

Read an event or keystroke. 'promptFunc' works the same way it does in getInputLine(). If 'keyOnly' is true, then we're only interested in keystroke events, and we'll ignore any other events entered.

Note that this routine is not generally called directly; callers should usually call the convenience routines getKey() or getEvent(), as needed.

`getInputDialog (icon, prompt, buttons, defaultButton, cancelButton)` | `input.t[257]`

Ask for input through a dialog. The arguments are the same as for the built-in inputDialog() function.

`getInputFile (prompt, dialogType, fileType, flags)` | `input.t[243]`

Ask for an input file.

`getInputLine (promptFunc?)` | `input.t[79]`

Read a line of input from the keyboard.

promptFunc can either be a callback function to invoke to display the prompt, or a single-quoted string containing the prompt. Of course, the caller can simply display the prompt before calling this routine rather than passing in a prompt callback, if desired.

If we're in HTML mode, this will switch into the 'tads-input' font while reading the line, so this routine should be used wherever possible rather than calling inputLine() or inputLineTimeout() directly.

`getInputLineExt (defObj)` | `input.t[91]`

Read a line of input from the keyboard - extended interface, using the InputDef object to define the input parameters. 'defObj' is an instance of class InputDef, defining how we're to handle the input.

`getKey (promptFunc?)` | `input.t[272]`

Read a keystroke, processing real-time events while waiting. 'promptFunc' works the same way it does with getInputLine().

`inputBegin (promptFunc)` | `input.t[525]`

Begin generic input. Cancels command report list capture, and shows the prompt if given.

`inputEventBegin (promptFunc)` | `input.t[441]`

Begin reading key/event input. We'll cancel any report gatherer so that prompt text shows immediately, and show the prompt if desired.

`inputEventEnd ( )` | `input.t[456]`

End keystroke/event input.

`inputLineBegin (defObj)` | `input.t[470]`

Begin command line editing. If we're in HTML mode, we'll show the appropriate codes to establish the input font.

`inputLineEnd ( )` | `input.t[496]`

End command line editing. If we're in HTML mode, we'll show the appropriate codes to close the input font.

`pauseForMore ( )` | `input.t[234]`

Pause for a MORE prompt.

Adv3Lite Library Reference Manual
Generated on 01/03/2024 from adv3Lite version 1.6.2