2013-10-09 21:12:03 +02:00
|
|
|
|
//Leency - 2012-2013
|
2012-11-26 16:26:15 +01:00
|
|
|
|
|
2013-10-09 21:12:03 +02:00
|
|
|
|
#define ITEM_HEIGHT 19
|
|
|
|
|
#define ITEM_WIDTH 165
|
|
|
|
|
dword col_work = 0xE4DFE1;
|
|
|
|
|
dword col_border = 0x9098B0;
|
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,
|
|
|
|
|
//"TrueType fonts" ,05,
|
|
|
|
|
#else
|
|
|
|
|
"View source F3",52,
|
|
|
|
|
"Free image cache" ,02,
|
|
|
|
|
#endif
|
2013-04-12 18:34:24 +02:00
|
|
|
|
//"TrueType fonts" ,05,
|
2012-11-26 16:26:15 +01:00
|
|
|
|
0};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-09 21:12:03 +02:00
|
|
|
|
proc_info MenuForm;
|
2012-11-26 16:26:15 +01:00
|
|
|
|
|
|
|
|
|
void menu_rmb()
|
|
|
|
|
{
|
|
|
|
|
mouse mm;
|
|
|
|
|
int items_num, items_cur;
|
|
|
|
|
int id1, key, i;
|
|
|
|
|
|
|
|
|
|
SetEventMask(100111b);
|
|
|
|
|
|
|
|
|
|
loop() switch(WaitEvent())
|
|
|
|
|
{
|
|
|
|
|
case evMouse:
|
|
|
|
|
mm.get();
|
|
|
|
|
|
|
|
|
|
GetProcessInfo(#MenuForm, SelfInfo);
|
|
|
|
|
id1=GetProcessSlot(MenuForm.ID);
|
|
|
|
|
if (id1<>GetActiveProcess()) ExitProcess();
|
|
|
|
|
|
|
|
|
|
id1=mm.y/ITEM_HEIGHT;
|
|
|
|
|
if (id1<0) || (id1+1>items_num) || (mm.x<0) || (mm.x>ITEM_WIDTH) break;
|
|
|
|
|
if (mm.lkm) || (mm.pkm)
|
|
|
|
|
{
|
2013-04-05 14:58:55 +02:00
|
|
|
|
ActivateWindow(GetProcessSlot(Form.ID));
|
2013-04-08 15:21:32 +02:00
|
|
|
|
SendWindowMessage(evButton, ITEMS_LIST[items_cur*2+1]);
|
|
|
|
|
SwitchToAnotherThread();
|
2012-11-26 16:26:15 +01:00
|
|
|
|
ExitProcess();
|
|
|
|
|
}
|
|
|
|
|
if (items_cur<>id1)
|
|
|
|
|
{
|
|
|
|
|
items_cur=id1;
|
|
|
|
|
goto _ITEMS_DRAW;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case evButton:
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case evKey:
|
|
|
|
|
key = GetKey();
|
|
|
|
|
if (key==27) ExitProcess();
|
|
|
|
|
if (key==178) && (items_cur)
|
|
|
|
|
{
|
|
|
|
|
items_cur--;
|
|
|
|
|
goto _ITEMS_DRAW;
|
|
|
|
|
}
|
|
|
|
|
if (key==177) && (items_cur+1<items_num)
|
|
|
|
|
{
|
|
|
|
|
items_cur++;
|
|
|
|
|
goto _ITEMS_DRAW;
|
|
|
|
|
}
|
|
|
|
|
if (key==13)
|
|
|
|
|
{
|
|
|
|
|
WB1.Scan(ITEMS_LIST[items_cur*2+1]);
|
|
|
|
|
ExitProcess();
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case evReDraw:
|
|
|
|
|
while (ITEMS_LIST[items_num*2]) items_num++;
|
2013-10-09 21:12:03 +02:00
|
|
|
|
DefineAndDrawWindow(Form.left+m.x,Form.top+m.y+GetSkinHeight()+3,ITEM_WIDTH+2,items_num*ITEM_HEIGHT+4,0x01, 0, 0, 0x01fffFFF);
|
|
|
|
|
DrawPopup(0,0,ITEM_WIDTH,items_num*ITEM_HEIGHT+2,0, -1,col_border);
|
2012-11-26 16:26:15 +01:00
|
|
|
|
|
|
|
|
|
_ITEMS_DRAW:
|
|
|
|
|
for (i=0; i<items_num; i++;)
|
|
|
|
|
{
|
2013-10-09 21:12:03 +02:00
|
|
|
|
if (i<>items_cur) EDX=col_work; else EDX=0x94AECE;
|
|
|
|
|
DrawBar(2, i*ITEM_HEIGHT+2, ITEM_WIDTH-2, ITEM_HEIGHT, EDX);
|
|
|
|
|
if (i<>items_cur) WriteText(19,i*ITEM_HEIGHT+9,0x80,0xf2f2f2,ITEMS_LIST[i*2]);
|
|
|
|
|
WriteText(18,i*ITEM_HEIGHT+8,0x80,0x000000,ITEMS_LIST[i*2]);
|
|
|
|
|
//if (ITEMS_LIST[i*2+1]==5) && (use_truetype==1) DrawBar(ITEM_WIDTH-18, i*ITEM_HEIGHT+9, 4, 4, 0x444444);
|
2012-11-26 16:26:15 +01:00
|
|
|
|
}
|
2013-10-09 21:12:03 +02:00
|
|
|
|
DrawBar(7, cur_encoding*ITEM_HEIGHT+9, 4, 4, 0x444444); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-11-26 16:26:15 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|