Difference between revisions of "Prevent.input"
From AGI Wiki
Jump to navigationJump to search (Created page with "The '''prevent.input''' command hides the input prompt and prevents the player from entering input. <code>prevent.input();</code> After a call to <code>prevent.input</code>,...") |
|||
Line 1: | Line 1: | ||
− | The '''prevent.input''' command hides the input prompt and prevents the player from entering input. | + | The '''prevent.input''' command hides the input prompt and prevents the player from entering keyboard input on the input line. |
− | + | == Syntax == | |
− | + | prevent.input(); | |
− | + | == Remarks == | |
− | + | If there is any text on the [[input line]], it remains there even when the input line gets hidden. Even though the input line is hidden, key presses will still be converted to [[controllers]], and [[reserved variable]] [[v19 (pressed key code)]] is still updated every time a key is pressed. | |
− | + | Use the '''[[accept.input]]''' command to restore the input prompt. | |
− | + | == Possible Errors == | |
− | + | None. | |
− | |||
− | |||
− | |||
− | |||
== Example == | == Example == | ||
− | |||
− | |||
<div class="CodeBlockHeader">Code:</div> | <div class="CodeBlockHeader">Code:</div> | ||
<syntaxhighlight lang="agi"> | <syntaxhighlight lang="agi"> | ||
− | + | prevent.input(); | |
− | + | [ input prompt is hidden, and player cannot enter text input | |
− | + | ... | |
− | + | accept.input(); | |
− | + | [ input prompt is restored/redisplayed, including any text | |
+ | [ that was on it when it was hidden | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | == Technical Information == | |
− | == | ||
− | |||
− | |||
− | |||
− | |||
− | + | {| border="1" cellpadding="2" | |
− | == | + | | style="background-color: #efefef" width="200" | '''Required Interpreter Version:''' |
+ | | width="175" | Available in all AGI versions. | ||
+ | |- | ||
+ | | style="background-color: #efefef" | '''Byte-Code Value:''' | ||
+ | | 119 (0x77 hex) | ||
+ | |} | ||
− | + | == See Also == | |
− | |||
− | |||
− | [[ | + | [[System Commands]]<br /> |
− | [[Category: | + | '''[[accept.input]]'''<br /> |
+ | [[Category:Commands]]<br /> |
Latest revision as of 20:03, 17 April 2019
The prevent.input command hides the input prompt and prevents the player from entering keyboard input on the input line.
Syntax
prevent.input();
Remarks
If there is any text on the input line, it remains there even when the input line gets hidden. Even though the input line is hidden, key presses will still be converted to controllers, and reserved variable v19 (pressed key code) is still updated every time a key is pressed. Use the accept.input command to restore the input prompt.
Possible Errors
None.
Example
Code:
<syntaxhighlight lang="agi"> prevent.input(); [ input prompt is hidden, and player cannot enter text input ... accept.input(); [ input prompt is restored/redisplayed, including any text [ that was on it when it was hidden </syntaxhighlight>
Technical Information
Required Interpreter Version: | Available in all AGI versions. |
Byte-Code Value: | 119 (0x77 hex) |