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;
|
|
|
|
|
int key;
|
|
|
|
|
|
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:
|
|
|
|
|
GetProcessInfo(#MenuForm, SelfInfo);
|
|
|
|
|
if (!CheckActiveProcess(MenuForm.ID)) ExitProcess();
|
|
|
|
|
|
2015-08-02 00:08:58 +02:00
|
|
|
|
mouse.get();
|
|
|
|
|
if (menu.ProcessMouse(mouse.x, mouse.y)) DrawMenuList();
|
2015-08-13 14:23:35 +02:00
|
|
|
|
if (mouse.lkm)&&(mouse.up) ItemClick();
|
2013-12-27 00:52:42 +01:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case evKey:
|
|
|
|
|
key = GetKey();
|
|
|
|
|
if (key==27) ExitProcess();
|
2015-08-13 14:23:35 +02:00
|
|
|
|
if (key==13) ItemClick();
|
2013-12-27 00:52:42 +01:00
|
|
|
|
if (menu.ProcessKey(key)) DrawMenuList();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case evReDraw:
|
2015-08-02 00:08:58 +02:00
|
|
|
|
DefineAndDrawWindow(Form.left+mouse.x-6,Form.top+mouse.y+GetSkinHeight()+3,menu.w+2,menu.h+4,0x01, 0, 0, 0x01fffFFF);
|
2014-03-22 11:29:29 +01:00
|
|
|
|
DrawPopup(0,0,menu.w,menu.h+3,0, col_bg,border_color);
|
2013-12-27 00:52:42 +01:00
|
|
|
|
DrawMenuList();
|
|
|
|
|
}
|
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();
|
|
|
|
|
}
|