Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing verblibm.h

LowKey_Menu (lines 556-594)

0556  !  Much better menus can be created using the optional library extension
0557  !  "menus.h".  These are provided for compatibility with previous practice:
0558  ! ----------------------------------------------------------------------------
0559   
0560  [ LowKey_Menu menu_choices EntryR ChoiceR lines main_title i j;
0561    menu_nesting++;
0562   .LKRD;
0563    menu_item=0;
0564    lines=indirect(EntryR);
0565    main_title=item_name;
0566   
0567    print "--- "; print (string) main_title; print " ---^^";
0568   
0569    if (menu_choices ofclass Routine) menu_choices.call();
0570    else print (string) menu_choices;
0571   
0572    for (::)
0573    {   L__M(##Miscellany, 52, lines);
0574        print "> ";
0575   
0576        #IFV3; read buffer parse;
0577        #IFNOT; read buffer parse DrawStatusLine;
0578        #ENDIF;
0579   
0580        i=parse-->1;
0581        if (i==QUIT1__WD or QUIT2__WD || parse->1==0)
0582        {   menu_nesting--; if (menu_nesting>0) rfalse;
0583            if (deadflag==0) <<Look>>;
0584            rfalse;
0585        }
0586        i=TryNumber(1);
0587        if (i==0) jump LKRD;
0588        if (i<1 || i>lines) continue;
0589        menu_item=i;
0590        j=indirect(ChoiceR);
0591        if (j==2) jump LKRD;
0592        if (j==3) rfalse;
0593    }
0594  ];


Last updated 27 February 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.