home *** CD-ROM | disk | FTP | other *** search
- ; Title : HOTEMENU.TSK Last Updated : 6th March 1991
- ; Author : Steve Johnson - FmP. Version : 1.00
- ; Purpose : Example 2 level menu with context sensitive help
-
- var char,1
- int first_choice,second_choice
- logical forever
- vconst attention,79
- var help_name,3
- var tname,8,"HOTEMENU"
-
- END
-
- forms logon.ovr ;in case /q and registered
- lookfor hotemenu.ovr
- if not found
- insert tname tname
- put "NO_FORMS"
- stop
- fi
- forms hotemenu.ovr
- until forever
- move 0c000h to bbmask
- move first_choice to choice
- put "B_BAR"
- move hilite to first_choice
- if choice = 30
- stop
- fi
- if choice = 31
- move display to help_name
- put help_name wait 0 noclear
- clear bbdisp
- else
- cursor 14 10 attention choice 5 display 5
- move second_choice to choice
- put "DRINKS"
- move hilite to second_choice
- cursor 15 10 attention choice 5 display 5
- inkey char
- fi
- fi
- stop
- endtask
- @VIDEO
- @NF B_BAR
- @HEAD CENTRE,"Bounce-Bar Snacks"
- @bright
- @colour page,cyan,blue
- @BANNER
- @bbimenu cyan,blue
- @DRAW
- >C<
-
- {QUARTER POUNDER WITH CHEESE }
- {SELECTION OF TOASTED SANDWICHES }
- {CHEESE BOARD }
- {PLOUGHMANS LUNCH (WITH STILTON) }
-
- >C<
- Press <esc> to exit
- @WINDOW LINE 17,COLUMN 18,DEPTH 6,WIDTH 44
- @gon
- 7------------------------------------------9
- 0 HELP is available 0
- 0 Press F1 to display context sensitive 0
- 0 help; i.e. each topic has its own help 0
- 0 text associated with it. 0
- 1------------------------------------------3
- @END
- @NF DRINKS
- @bbmenu cyan,blue
- @bright
- @window line8,column4,depth3,width 72
- @GON
- 4----------------------------------------------------------------------6
- 0{NO-DRINK }{TEA }{COFFEE }{COLA }{MILK }{ORANGE JUICE }{ALCOHOL FREE LAGER } 0
- 1----------------------------------------------------------------------3
- @WINDOW LINE 17,COLUMN 18,DEPTH 6,WIDTH 44
- @END
- @NF Qua
- @colour char,cyan,blue
- @WINDOW LINE 18,COLUMN 20,DEPTH 4,WIDTH 40
- Highlight a topic using <Space>, <home>
- or <arrow> keys then press <return>
- - or -
- Press the first character of a topic.
- @END
- @NF Sel
- @colour char,cyan,blue
- @WINDOW LINE 18,COLUMN 20,DEPTH 4,WIDTH 40
- This is an Instant Bounce-bar menu.
- Pressing the first character is same as
- highlighting a topic and pressing
- <return>.
- @END
- @NF Che
- @colour char,cyan,blue
- @WINDOW LINE 18,COLUMN 20,DEPTH 4,WIDTH 40
- Drinks menu is not an instant bounce-bar
- menu. Pressing first character just
- highlights a topic. Try pressing C on
- next menu (there are 2 "C" topics).
- @END
- @NF Plo
- @colour char,cyan,blue
- @WINDOW LINE 18,COLUMN 20,DEPTH 4,WIDTH 40
- Context sensitive help like this is easy
- to achieve. In this case displaying a
- form named as first 3 characters of
- topic currently highlighted.
- @END
- @eof
-