Previous: PCVideo and graphics support
Up: Adaptations to pre-existing p-System units
Next: FastImage
Previous Page: Inter-Program Memory
Next Page: FastImage

MenuDisplay

MenuDisplay has been updated to allow IBM's stated requirement of permitting the student to quit from the whole dialogue.

When run entirely from floppy discs, ETC dialogues have always prevented any return to the operating system, to protect the non-technical student from having to deal with its details. So no option was ever offered for quitting the whole dialogue, past the attract mode. This arrangement assumes an independent, personal machine.

Networked environments require different assumptions, as it is not always feasible to reboot a network machine just for one application; nor are all user groups willing to accept such a requirement. MenuDisplay has therefore been modified to permit an option to be displayed that requests the dialogue program to quit.

MenuDisplay requires from the Attract routine's keyed file some data messages that define the text to appear as menu items. An additional data message named QuitDialogueItem can now be defined that gives the text of the quit item. If it is present in the keyed file, MenuDisplay creates another port below the one(s) holding the module selection items, and permits the arrow keys to move the item highlight onto it following the last module item. If the quit item is selected, an index value is returned to the attract mode one greater than that for the final module.

EXAMPLE:

<<QuitDialogueItem>> DATA
Quit Basket Weaving
<<END QuitDialogueItem>>

Please refer to section 2.1.2 for corresponding changes to Ports' default Extra Services promptline.

The interface section for this new version is as follows. Though it provides no new declarations, the compilation flags and history should be noted:

{%
UNIT MenuDisplay - Creates a menu of dialog activities and controls the
                   user selection of the activity.

File Name : MENU.TEXT Code Name: MENU.CODE

History: Date Coder Modification

May 1985 Craig Rolandelli First version June 1985 Craig Rolandelli Version 1.2b - Fixed Port demensioning June 1985 Craig Rolandelli Version 1.3a - Recompiled under IV.2 Constant removed from interface, error routines added. April 1986 Craig Rolandelli Version 1.3b - Reconstructed unit from version 1.2b, and pu.menu.text(patutil). Error routines omitted, and fixed bug which caused it to crash when a menu item of length 75 or more was given to it. January 1990 A. Milne DOS version, Turbo Pascal 5.0 . ClearAll installed where apparently was missing. Maximum item length for side by side menus reduced to allow for .5 column border.

Added handling for extra menu item to request quit from whole dialogue. NOTE: Attract program must exit with DOS error code 128 to signal SRSWorld also to exit.

Compilation context: Prefix for Compilation: None Units used : Ports, PDisplay Files included : None

Files used at execution: Requires a Keyed file with the following messages:

MessageNames, ModuleTitle, ColorSchemes, SeriesTitle, Dev&Fund, InitPorts.

Important Additional Info:

WARNING: This unit was reconstructed from a variety of pieces. We DO NOT have sources for version 1.3a which is waht is used on the IBM project.

%} {$F+,O+} {$DEFINE CanExitDialogue} { Defining this causes MenuDisplay to permit student to choose to return to whatever called this dialogue. } UNIT MenuDisplay;

INTERFACE

{VERSION 1.3b -- 4/2/86 CR}

CONST MaxNumOfMenuItems = 12; { Maximum number of modules that this unit can handle.}

PROCEDURE TitlePage;

PROCEDURE MenuPage(VAR WhichItem: INTEGER);



Previous: PCVideo and graphics support
Up: Adaptations to pre-existing p-System units
Next: FastImage
Previous Page: Inter-Program Memory
Next Page: FastImage

Educational Technology Center
Dept. of Info. and Comp.Sci.
Univ. of California, Irvine
92717, CA, USA