inputManagerobject | input.t[68] |
Superclass Tree | Property Summary | Method Summary | Property Details | Method Details |
inputManager : PostRestoreObject
inputManager
PostRestoreObject
ModuleExecObject
object
inProgressDefObj
inputEventInProgress
inputLineInProgress
noInputTimeout
Inherited from PostRestoreObject
:
restoreCode
Inherited from ModuleExecObject
:
execAfterMe
execBeforeMe
hasInitialized_
isDoingExec_
isExecuted_
cancelInputInProgress
execute
getEvent
getEventOrKey
getInputDialog
getInputFile
getInputLine
getInputLineExt
getKey
inputBegin
inputEventBegin
inputEventEnd
inputLineBegin
inputLineEnd
pauseForMore
processRealTimeEvents
Inherited from ModuleExecObject
:
_execute
classExec
inProgressDefObj | input.t[761] |
inputEventInProgress | input.t[764] |
inputLineInProgress | input.t[758] |
noInputTimeout | input.t[783] |
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.
cancelInputInProgress (reset) | input.t[554] |
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[727] |
getEvent (allowRealTime, promptFunc) | input.t[413] |
getEventOrKey (allowRealTime, promptFunc, keyOnly) | input.t[429] |
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[366] |
getInputFile (prompt, dialogType, fileType, flags) | input.t[338] |
getInputLine (allowRealTime, promptFunc) | input.t[90] |
If allowRealTime is true, we'll execute any real-time events that are already due to run, and then we'll allow the input to be interrupted by real-time events, if interrupted input is supported on the local platform. Otherwise, we will not process any real-time events.
promptFunc is a callback function to invoke to display the prompt. This is provided as a callback so that we can re-display the prompt as necessary after real-time event interruptions. Note that if real-time interruption is not to be allowed, 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[102] |
getKey (allowRealTime, promptFunc) | input.t[394] |
inputBegin (promptFunc) | input.t[707] |
inputEventBegin (promptFunc) | input.t[623] |
inputEventEnd ( ) | input.t[638] |
inputLineBegin (defObj) | input.t[652] |
inputLineEnd ( ) | input.t[678] |
pauseForMore (freezeRealTime) | input.t[282] |
In order to ensure that the display makes sense to the user, we flush any captured input in the transcript before pausing. We re-activate transcript capture after the pause if it was active before. Note that in some cases, this could affect the overall output for the command, since some commands wait until the very end of the command to go back and process the entire transcript for the command. Since we interrupt the transcript, flushing any output that occurred before the pause, a command that goes back over its entire output stream at the end of the turn won't be able to see or modify any of the output that occurred prior to the pause, since we will have flushed the output to that point.
processRealTimeEvents (allowRealTime) | input.t[583] |
If allowRealTime is nil, we won't process real-time events at all; we'll merely return nil for the timeout to indicate to the caller that any user input interaction about to be attempted should wait indefinitely.