//Leency - 2012-2013 char *ITEMS_LIST[]={ "WIN F5",54, "DOS Ctrl+D",04, "KOI Ctrl+K",11, "UTF Ctrl+U",21, #ifdef LANG_RUS "Исходник страницы F3",52, "Очистить кэш картинок" ,02, #else "View source F3",52, "Free image cache" ,02, #endif 0}; void menu_rmb() { mouse mm; proc_info MenuForm; llist menu; int overid, key, N; dword col_work = 0xE4DFE1; dword col_border = 0x9098B0; menu.w = 165; menu.line_h = 19; while (ITEMS_LIST[menu.count*2]) menu.count++; SetEventMask(100111b); loop() switch(WaitEvent()) { case evMouse: GetProcessInfo(#MenuForm, SelfInfo); N=GetProcessSlot(MenuForm.ID); if (N<>GetActiveProcess()) ExitProcess(); mm.get(); overid=mm.y/menu.line_h; if (overid<0) || (overid+1>menu.count) || (mm.x<0) || (mm.x>menu.w) break; if (mm.lkm) || (mm.pkm) { action_buf = ITEMS_LIST[menu.current*2+1]; ExitProcess(); } if (menu.current<>overid) { menu.current=overid; goto _ITEMS_DRAW; } break; case evKey: key = GetKey(); if (key==27) ExitProcess(); if (key==178) && (menu.current) { menu.current--; goto _ITEMS_DRAW; } if (key==177) && (menu.current+1