|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
− | [[Tutorials and Guides|Tutorials and Guides Table of Contents]]<br />
| |
− | [[AGI Command Reference|AGI Command Reference Index]]<br />
| |
| | | |
− | <div align="center">
| |
− | Page:
| |
− | [[AGI Command Reference - Arithmetic Commands|1]] |
| |
− | [[AGI Command Reference - Commands to Load and unLoad Resources|2]] |
| |
− | [[AGI Command Reference - Program Control Commands|3]] |
| |
− | [[AGI Command Reference - Object Control Commands|4]] |
| |
− | [[AGI Command Reference - Object Description Commands|5]] |
| |
− | [[AGI Command Reference - Object Motion Control Commands|6]] |
| |
− | [[AGI Command Reference - Inventory Item Management Commands|7]] |
| |
− | [[AGI Command Reference - PIC Resource Management Commands|8]] |
| |
− | [[AGI Command Reference - Sound Resource Management Commands|9]] |
| |
− | [[AGI Command Reference - Text Management Commands|10]] |
| |
− | [[AGI Command Reference - String Management Commands|11]] |
| |
− | [[AGI Command Reference - Initialization Commands|12]] |
| |
− | [[AGI Command Reference - Menu Management Commands|13]] |
| |
− | [[AGI Command Reference - Test Commands|14]] |
| |
− | [[AGI Command Reference - Other Commands|15]] |
| |
− | [[AGI Command Reference - Unknown Commands|16]]
| |
− | </div><br />
| |
− |
| |
− | <div align="center"><span style="font-size: 22pt">Menu Management Commands</span><br />
| |
− | ''By [[Chris Cromer]]''</div>
| |
− |
| |
− |
| |
− |
| |
− | Creating your program, you can offer the player a choice using a system of menus. These may be short one-line questions (menu header) with several answers (menu elements), or a prompt to change some of the system parameters, for example, object movement speed. Let us consider these commands.
| |
− |
| |
− |
| |
− |
| |
− | == set.menu(n); ==
| |
− |
| |
− | <blockquote>Message n is used as the header of the menu elements which follow.</blockquote>
| |
− |
| |
− | == set.menu.item(n, c); ==
| |
− |
| |
− | <blockquote>Message n is used as a menu element, where c is this element's code (a number between 0 and 255).</blockquote>
| |
− |
| |
− | == submit.menu(); ==
| |
− |
| |
− | <blockquote>Ends menu creation.</blockquote>
| |
− |
| |
− | == enable.item(c); disable.item(c); ==
| |
− |
| |
− | <blockquote>Enables or disables a menu item with the code c.
| |
− |
| |
− | {|
| |
− | |<pre>
| |
− | |-------- heading
| |
− | v
| |
− | -------------------------------
| |
− | | File |
| |
− | -------------------------------
| |
− | Menu -- >| Save |
| |
− | Element |------------|
| |
− | | Restore |
| |
− | |------------|
| |
− | |XXXXXXXXXXXX| < - menu element disabled
| |
− | |------------| using disable.item
| |
− | | Quit |
| |
− | --------------
| |
− | </pre>
| |
− | |}</blockquote>
| |
− |
| |
− | == menu.input(); ==
| |
− |
| |
− | <blockquote>If Flag(14) = 1, a menu system is shown on the screen, allowing the user to choose an item. Whether an item with the code c has been chosen can be tested using a command 'controller (c)', where c is the code assigned to the menu item.</blockquote>
| |
− |
| |
− |
| |
− |
| |
− | <div align="center">
| |
− | Page:
| |
− | [[AGI Command Reference - Arithmetic Commands|1]] |
| |
− | [[AGI Command Reference - Commands to Load and unLoad Resources|2]] |
| |
− | [[AGI Command Reference - Program Control Commands|3]] |
| |
− | [[AGI Command Reference - Object Control Commands|4]] |
| |
− | [[AGI Command Reference - Object Description Commands|5]] |
| |
− | [[AGI Command Reference - Object Motion Control Commands|6]] |
| |
− | [[AGI Command Reference - Inventory Item Management Commands|7]] |
| |
− | [[AGI Command Reference - PIC Resource Management Commands|8]] |
| |
− | [[AGI Command Reference - Sound Resource Management Commands|9]] |
| |
− | [[AGI Command Reference - Text Management Commands|10]] |
| |
− | [[AGI Command Reference - String Management Commands|11]] |
| |
− | [[AGI Command Reference - Initialization Commands|12]] |
| |
− | [[AGI Command Reference - Menu Management Commands|13]] |
| |
− | [[AGI Command Reference - Test Commands|14]] |
| |
− | [[AGI Command Reference - Other Commands|15]] |
| |
− | [[AGI Command Reference - Unknown Commands|16]]
| |
− | </div><br />
| |
− |
| |
− | [[Tutorials and Guides|Tutorials and Guides Table of Contents]]<br />
| |
− | [[AGI Command Reference|AGI Command Reference Index]]
| |
− |
| |
− | <span style="float: left">[[AGI Command Reference - Initialization Commands|< Previous: Initialization Commands]]</span><span style="float: right">[[AGI Command Reference - Test Commands|Next: Test Commands >]]</span>
| |
− |
| |
− |
| |
− |
| |
− | [[Category:Logic]]
| |
− | [[Category:Commands]]
| |
− | [[Category:References]]
| |
− | [[Category:Tutorials]]
| |
− | [[Category:Menus]]
| |