Subversion Repositories Kolibri OS

Rev

Rev 4074 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4074 Rev 4077
Line 22... Line 22...
22
	llist menu;
22
	llist menu;
23
	int overid, key, N;
23
	int overid, key, N;
24
	dword col_work    = 0xE4DFE1;
24
	dword col_work    = 0xE4DFE1;
25
	dword col_border  = 0x9098B0;
25
	dword col_border  = 0x9098B0;
Line 26... Line -...
26
 
-
 
27
	menu.w = 165;
-
 
28
	menu.line_h = 19;
26
 
29
	menu.first = 0;
27
	menu.first = menu.current = 0;
-
 
28
	while (ITEMS_LIST[menu.count*2]) {menu.count++; menu.visible++;}
-
 
29
	menu.line_h = 19;
-
 
30
	menu.w = 165;
30
	while (ITEMS_LIST[menu.count*2]) {menu.count++; menu.visible++;}
31
	menu.h = menu.count * menu.line_h;
Line 31... Line 32...
31
	SetEventMask(100111b); 
32
	SetEventMask(100111b); 
32
 
33
 
33
	loop() switch(WaitEvent())
34
	loop() switch(WaitEvent())
34
	{
35
	{
35
	case evMouse:
36
	case evMouse:
36
				GetProcessInfo(#MenuForm, SelfInfo);
37
				GetProcessInfo(#MenuForm, SelfInfo);
Line 37... Line 38...
37
				N=GetProcessSlot(MenuForm.ID);
38
				N=GetProcessSlot(MenuForm.ID);
38
				if (N<>GetActiveProcess()) ExitProcess();
-
 
39
 
39
				if (N<>GetActiveProcess()) ExitProcess();
40
				mm.get();				
-
 
41
				overid=mm.y/menu.line_h;
-
 
42
				if (overid<0) || (overid+1>menu.count) || (mm.x<0) || (mm.x>menu.w) break;
40
 
43
				if (mm.lkm) || (mm.pkm)
-
 
44
				{
-
 
45
					action_buf = ITEMS_LIST[menu.current*2+1];
-
 
46
					ExitProcess();
-
 
47
				}
-
 
48
				if (menu.current<>overid)
-
 
49
				{
-
 
50
					menu.current=overid;
41
				mm.get();
Line 51... Line 42...
51
					goto _ITEMS_DRAW;
42
				if (menu.ProcessMouse(mm.x, mm.y)) goto _ITEMS_DRAW;
52
				}
43
				if (mm.lkm) || (mm.pkm) { action_buf = ITEMS_LIST[menu.current*2+1]; ExitProcess(); }
53
				break;
44
				break;