2013-12-27 00:52:42 +01:00
|
|
|
|
//Leency - 2012-2013
|
|
|
|
|
|
|
|
|
|
char *ITEMS_LIST[]={
|
|
|
|
|
#ifdef LANG_RUS
|
2015-08-13 14:23:35 +02:00
|
|
|
|
"<EFBFBD><EFBFBD>ᬮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>室<EFBFBD><E5AEA4><EFBFBD>",
|
|
|
|
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>室<EFBFBD><E5AEA4><EFBFBD>",
|
|
|
|
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
|
|
|
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>⨭<EFBFBD><E2A8AD>",
|
|
|
|
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㧮<EFBFBD>",
|
2013-12-27 00:52:42 +01:00
|
|
|
|
#else
|
2015-08-13 14:23:35 +02:00
|
|
|
|
"View source",
|
|
|
|
|
"Edit source",
|
|
|
|
|
"History",
|
|
|
|
|
"Free image cache",
|
|
|
|
|
"Download Manager",
|
2013-12-27 00:52:42 +01:00
|
|
|
|
#endif
|
2015-08-13 14:23:35 +02:00
|
|
|
|
0};
|
2013-12-27 00:52:42 +01:00
|
|
|
|
|
|
|
|
|
llist menu;
|
|
|
|
|
|
|
|
|
|
void menu_rmb()
|
|
|
|
|
{
|
|
|
|
|
proc_info MenuForm;
|
|
|
|
|
|
2015-08-13 14:23:35 +02:00
|
|
|
|
menu.ClearList();
|
|
|
|
|
while (ITEMS_LIST[menu.count]) menu.count++;
|
2015-08-10 14:06:47 +02:00
|
|
|
|
menu.SetSizes(2,2,177,menu.count*19,19);
|
2013-12-27 00:52:42 +01:00
|
|
|
|
SetEventMask(100111b);
|
|
|
|
|
|
2015-07-30 17:49:09 +02:00
|
|
|
|
_BEGIN_APPLICATION_MENU:
|
|
|
|
|
switch(WaitEvent())
|
2013-12-27 00:52:42 +01:00
|
|
|
|
{
|
|
|
|
|
case evMouse:
|
2015-09-06 14:34:30 +02:00
|
|
|
|
GetProcessInfo(#MenuForm, SelfInfo);
|
|
|
|
|
if (!CheckActiveProcess(MenuForm.ID)) ExitProcess();
|
|
|
|
|
mouse.get();
|
|
|
|
|
if (menu.ProcessMouse(mouse.x, mouse.y)) DrawMenuList();
|
|
|
|
|
if (mouse.lkm)&&(mouse.up) ItemClick();
|
|
|
|
|
break;
|
2013-12-27 00:52:42 +01:00
|
|
|
|
|
2015-09-06 14:34:30 +02:00
|
|
|
|
case evKey:
|
|
|
|
|
GetKeys();
|
|
|
|
|
if (key_scancode==SCAN_CODE_ESC) ExitProcess();
|
|
|
|
|
if (key_scancode==SCAN_CODE_ENTER) ItemClick();
|
|
|
|
|
if (menu.ProcessKey(key_scancode)) DrawMenuList();
|
|
|
|
|
break;
|
2013-12-27 00:52:42 +01:00
|
|
|
|
|
2015-09-06 14:34:30 +02:00
|
|
|
|
case evReDraw:
|
|
|
|
|
DefineAndDrawWindow(Form.left+mouse.x-6,Form.top+mouse.y+GetSkinHeight()+3,menu.w+2,menu.h+4,0x01, 0, 0, 0x01fffFFF);
|
|
|
|
|
DrawPopup(0,0,menu.w,menu.h+3,0, col_bg,border_color);
|
|
|
|
|
DrawMenuList();
|
2013-12-27 00:52:42 +01:00
|
|
|
|
}
|
2015-07-30 17:49:09 +02:00
|
|
|
|
goto _BEGIN_APPLICATION_MENU;
|
2013-12-27 00:52:42 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DrawMenuList()
|
|
|
|
|
{
|
|
|
|
|
int N;
|
|
|
|
|
|
|
|
|
|
for (N=0; N<menu.count; N++;)
|
|
|
|
|
{
|
|
|
|
|
if (N==menu.current)
|
|
|
|
|
DrawBar(menu.x, N*menu.line_h+menu.y, menu.w-3, menu.line_h, 0x94AECE);
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-03-22 11:29:29 +01:00
|
|
|
|
DrawBar(menu.x, N*menu.line_h+menu.y, menu.w-3, menu.line_h, col_bg);
|
2015-08-13 14:23:35 +02:00
|
|
|
|
WriteText(19,N*menu.line_h+9,0x80,0xf2f2f2,ITEMS_LIST[N]);
|
2013-12-27 00:52:42 +01:00
|
|
|
|
}
|
2015-08-13 14:23:35 +02:00
|
|
|
|
WriteText(18,N*menu.line_h+8,0x80,0x000000,ITEMS_LIST[N]);
|
2013-12-27 00:52:42 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
2015-08-13 14:23:35 +02:00
|
|
|
|
|
|
|
|
|
void ItemClick()
|
|
|
|
|
{
|
2015-08-23 21:59:44 +02:00
|
|
|
|
action_buf = VIEW_SOURCE + menu.current;
|
2015-08-13 14:23:35 +02:00
|
|
|
|
ExitProcess();
|
|
|
|
|
}
|