Open.dialogue

From AGI Wiki
Revision as of 18:10, 27 March 2019 by Andrew Korson (talk | contribs) (Created page with "The '''open.dialogue''' command affects how '''get.string''' and '''get.num''' commands operate when AGI is run on a system using a Hercules Graphics Card (HGC). == S...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The open.dialogue command affects how get.string and get.num commands operate when AGI is run on a system using a Hercules Graphics Card (HGC).

Syntax

open.dialogue();

Remarks

The default behavior for get.string and get.num commands on an HGC monitor is to display an input box, similar to the one used for normal player input. The open.dialogue command will cause get.string and get.num to operate the same way as on other displays, meaning get.num will use the input line and get.string will display the prompt according to the row and column argument values.

Use the close.dialogue to restore default behavior.

This command has no effect if called while running on a non-HGC monitor. AGI will just ignore it. Unless you are intending to run on an HGC monitor, this command has no usefulness.

Possible Errors

None.

Example

Code:

<syntaxhighlight lang="agi"> [ assume AGI is running on a monochrome system open.dialogue(); get.num("Enter a number", v228); [ get.num works as if on a non-HGC system ... close.dialogue(); get.string("Enter a number" v228); [ get.num displays an input box on an HGC system </syntaxhighlight>

Technical Information

Required Interpreter Version: Available in version 2.411 and above.
Byte-Code Value: 163 (0xA3 hex)

See Also

close.dialogue
get.string
get.num