Difference between revisions of "Accept.input"

From AGI Wiki
Jump to navigationJump to search
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 +
[[Category:AGI Pages]]
 
The '''accept.input''' command displays the [[input line]] and allows a player to enter text input.
 
The '''accept.input''' command displays the [[input line]] and allows a player to enter text input.
  
Line 25: Line 26:
 
prevent.input(); [ input prompt is hidden, and player cannot enter text input  
 
prevent.input(); [ input prompt is hidden, and player cannot enter text input  
 
...
 
...
accept.input(); [ input prompt is restored/redisplayed, including any text
+
accept.input(); [ input prompt is restored/redisplayed, including any text
                      [ that was on it when it was hidden
+
                [ that was on it when it was hidden
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Latest revision as of 11:11, 28 January 2022

The accept.input command displays the input line and allows a player to enter text input.

Syntax

accept.input();

Parameters

  • None

Remarks

The input line is hidden by default when AGI starts, and needs to be enabled with accept.input. The line is displayed on the row specified by the most recent '''configure.screen''' command. Use the prevent.input command to hide the input line.

When the input line is displayed, any text that was on the line at the time it was hidden will be displayed as well.

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: 120 (0x78 hex)

See Also