program ccme; var ok, clicked:command; selindex, convert, open_map, settings, quit:integer; begin showMenu('Main menu', CH_IMPLICIT); ok:=createCommand('Ok', CM_OK, 0); addCommand(ok); convert:=menuAppendString('Convert map'); open_map:=menuAppendString('Open map'); settings:=menuAppendString('Settings'); quit:=menuAppendString('Quit'); repaint; repeat delay(100); clicked:=getClickedCommand(); until clicked<>emptyCommand; if(clicked=ok) then begin repeat selindex:=menuGetSelectedIndex(); until selindex<>quit; end; end.