#ENDIF; #IFV5; [ DoMenu menu_choices EntryR ChoiceR lines main_title main_wid cl i j oldcl pkey; if (pretty_flag==0) return LowKey_Menu(menu_choices,EntryR,ChoiceR); menu_nesting++; menu_item=0; lines=indirect(EntryR); main_title=item_name; main_wid=item_width; cl=7; .ReDisplay; oldcl=0; @erase_window $ffff; i=lines+7; @split_window i; i = 0->33; if (i==0) i=80; @set_window 1; @set_cursor 1 1; style reverse; spaces(i); j=i/2-main_wid; @set_cursor 1 j; print (string) main_title; @set_cursor 2 1; spaces(i); @set_cursor 2 2; print (string) NKEY__TX; j=i-12; @set_cursor 2 j; print (string) PKEY__TX; @set_cursor 3 1; spaces(i); @set_cursor 3 2; print (string) RKEY__TX; j=i-17; @set_cursor 3 j; if (menu_nesting==1) print (string) QKEY1__TX; else print (string) QKEY2__TX; style roman; @set_cursor 5 2; font off; if (menu_choices ofclass String) print (string) menu_choices; else menu_choices.call(); for (::) { if (cl ~= oldcl) { if (oldcl>0) { @set_cursor oldcl 4; print " "; } @set_cursor cl 4; print ">"; } oldcl=cl; @read_char 1 -> pkey; if (pkey==NKEY1__KY or NKEY2__KY or 130) { cl++; if (cl==7+lines) cl=7; continue; } if (pkey==PKEY1__KY or PKEY2__KY or 129) { cl--; if (cl==6) cl=6+lines; continue; } if (pkey==QKEY1__KY or QKEY2__KY or 27 or 131) break; if (pkey==10 or 13 or 132) { @set_window 0; font on; new_line; new_line; new_line; menu_item=cl-6; EntryR.call(); @erase_window $ffff; @split_window 1; i = 0->33; if (i==0) { i=80; } @set_window 1; @set_cursor 1 1; style reverse; spaces(i); j=i/2-item_width; @set_cursor 1 j; print (string) item_name; style roman; @set_window 0; new_line; i = ChoiceR.call(); if (i==2) jump ReDisplay; if (i==3) break; L__M(##Miscellany, 53); @read_char 1 -> pkey; jump ReDisplay; } } menu_nesting--; if (menu_nesting>0) rfalse; font on; @set_cursor 1 1; @erase_window $ffff; @set_window 0; new_line; new_line; new_line; if (deadflag==0) <>; ];