2013-10-09 21:12:03 +02:00
|
|
|
|
//Leency - 2012-2013
|
2012-11-26 16:26:15 +01:00
|
|
|
|
|
|
|
|
|
char *ITEMS_LIST[]={
|
2013-10-09 21:12:03 +02:00
|
|
|
|
"WIN F5",54,
|
|
|
|
|
"DOS Ctrl+D",04,
|
|
|
|
|
"KOI Ctrl+K",11,
|
|
|
|
|
"UTF Ctrl+U",21,
|
|
|
|
|
#ifdef LANG_RUS
|
|
|
|
|
"<EFBFBD><EFBFBD>室<EFBFBD><EFBFBD><EFBFBD> <20><>࠭<EFBFBD><E0A0AD><EFBFBD> F3",52,
|
|
|
|
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>⨭<EFBFBD><E2A8AD>" ,02,
|
|
|
|
|
#else
|
|
|
|
|
"View source F3",52,
|
|
|
|
|
"Free image cache" ,02,
|
|
|
|
|
#endif
|
2012-11-26 16:26:15 +01:00
|
|
|
|
0};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void menu_rmb()
|
|
|
|
|
{
|
|
|
|
|
mouse mm;
|
2013-10-15 00:41:27 +02:00
|
|
|
|
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++;
|
2012-11-26 16:26:15 +01:00
|
|
|
|
SetEventMask(100111b);
|
|
|
|
|
|
|
|
|
|
loop() switch(WaitEvent())
|
|
|
|
|
{
|
|
|
|
|
case evMouse:
|
|
|
|
|
GetProcessInfo(#MenuForm, SelfInfo);
|
2013-10-15 00:41:27 +02:00
|
|
|
|
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;
|
2012-11-26 16:26:15 +01:00
|
|
|
|
if (mm.lkm) || (mm.pkm)
|
|
|
|
|
{
|
2013-10-15 00:41:27 +02:00
|
|
|
|
action_buf = ITEMS_LIST[menu.current*2+1];
|
2012-11-26 16:26:15 +01:00
|
|
|
|
ExitProcess();
|
|
|
|
|
}
|
2013-10-15 00:41:27 +02:00
|
|
|
|
if (menu.current<>overid)
|
2012-11-26 16:26:15 +01:00
|
|
|
|
{
|
2013-10-15 00:41:27 +02:00
|
|
|
|
menu.current=overid;
|
2012-11-26 16:26:15 +01:00
|
|
|
|
goto _ITEMS_DRAW;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case evKey:
|
|
|
|
|
key = GetKey();
|
|
|
|
|
if (key==27) ExitProcess();
|
2013-10-15 00:41:27 +02:00
|
|
|
|
if (key==178) && (menu.current)
|
2012-11-26 16:26:15 +01:00
|
|
|
|
{
|
2013-10-15 00:41:27 +02:00
|
|
|
|
menu.current--;
|
2012-11-26 16:26:15 +01:00
|
|
|
|
goto _ITEMS_DRAW;
|
|
|
|
|
}
|
2013-10-15 00:41:27 +02:00
|
|
|
|
if (key==177) && (menu.current+1<menu.count)
|
2012-11-26 16:26:15 +01:00
|
|
|
|
{
|
2013-10-15 00:41:27 +02:00
|
|
|
|
menu.current++;
|
2012-11-26 16:26:15 +01:00
|
|
|
|
goto _ITEMS_DRAW;
|
|
|
|
|
}
|
|
|
|
|
if (key==13)
|
|
|
|
|
{
|
2013-10-15 00:41:27 +02:00
|
|
|
|
action_buf = ITEMS_LIST[menu.current*2+1];
|
2012-11-26 16:26:15 +01:00
|
|
|
|
ExitProcess();
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case evReDraw:
|
2013-10-15 00:41:27 +02:00
|
|
|
|
DefineAndDrawWindow(Form.left+m.x,Form.top+m.y+GetSkinHeight()+3,menu.w+2,menu.count*menu.line_h+4,0x01, 0, 0, 0x01fffFFF);
|
|
|
|
|
DrawPopup(0,0,menu.w,menu.count*menu.line_h+3,0, col_work,col_border);
|
|
|
|
|
//PutPixel();
|
2012-11-26 16:26:15 +01:00
|
|
|
|
|
|
|
|
|
_ITEMS_DRAW:
|
2013-10-15 00:41:27 +02:00
|
|
|
|
for (N=0; N<menu.count; N++;)
|
2012-11-26 16:26:15 +01:00
|
|
|
|
{
|
2013-10-15 00:41:27 +02:00
|
|
|
|
if (N==menu.current)
|
|
|
|
|
DrawBar(2, N*menu.line_h+2, menu.w-3, menu.line_h, 0x94AECE);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DrawBar(2, N*menu.line_h+2, menu.w-3, menu.line_h, col_work);
|
|
|
|
|
WriteText(19,N*menu.line_h+9,0x80,0xf2f2f2,ITEMS_LIST[N*2]);
|
|
|
|
|
}
|
|
|
|
|
WriteText(18,N*menu.line_h+8,0x80,0x000000,ITEMS_LIST[N*2]);
|
2012-11-26 16:26:15 +01:00
|
|
|
|
}
|
2013-10-15 00:41:27 +02:00
|
|
|
|
DrawBar(7, cur_encoding*menu.line_h+9, 4, 4, 0x444444); //show current encoding
|
2012-11-26 16:26:15 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|