Rev 2764 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2764 | Rev 2793 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | 2 | ||
3 | #define ITEM_HEIGHT 18 |
3 | #define ITEM_HEIGHT 18 |
Line 4... | Line 4... | ||
4 | #define ITEM_WIDTH 138 |
4 | #define ITEM_WIDTH 138 |
5 | 5 | ||
- | 6 | char *ITEMS_LIST[]={ |
|
6 | char *ITEMS_LIST[]={ |
7 | "View in Tinypad F3", |
7 | "View html code F3", |
8 | "View in TextEdit F4", |
8 | "--------------------", //ñäåëàòü îïðåäåëåíèå òàêèõ ëèíèé è ðèñîâàòü èõ |
9 | "--------------------", //ñäåëàòü îïðåäåëåíèå òàêèõ ëèíèé è ðèñîâàòü èõ |
9 | "KOI-8 Ctrl+K", |
10 | "KOI-8 Ctrl+K", |
Line 15... | Line 16... | ||
15 | 16 | ||
16 | void menu_rmb() |
17 | void menu_rmb() |
Line 17... | Line 18... | ||
17 | { |
18 | { |
18 | 19 | ||
19 | mouse mm; |
20 | mouse mm; |
Line 20... | Line 21... | ||
20 | int items_num; |
21 | int items_num, items_cur; |
Line 21... | Line 22... | ||
21 | int id, letitclose=0; |
22 | byte id, key; |
22 | 23 | ||
23 | SetEventMask(100111b); |
24 | SetEventMask(100111b); |
24 | 25 | ||
25 | loop() switch(CheckEvent()) |
26 | loop() switch(CheckEvent()) |
26 | { |
27 | { |
27 | case evMouse: |
28 | case evMouse: |
- | 29 | mm.get(); |
|
28 | /*mm.get(); |
30 | id=mm.y/ITEM_HEIGHT; |
29 | //êóëüíî |
31 | if (id<0) || (id+1>items_num) break; |
- | 32 | if (items_cur<>id) |
|
- | 33 | { |
|
30 | if (mm.x>85) && (mm.x<155) && (mm.y>190) && (mm.y<190+22) |
34 | items_cur=id; |
Line 31... | Line 35... | ||
31 | if (mm.lkm) {DrawRegion_3D(86,191,68,20,0xC7C7C7,0xFFFFFF); letitclose=1;} |
35 | goto _ITEMS_DRAW; |
32 | ELSE {IF (letitclose) {DrawRegion_3D(86,191,68,20,0xFFFFFF,0xC7C7C7); Pause(7); ExitProcess();}} |
36 | } |
33 | ELSE IF (letitclose) {letitclose=0; DrawRegion_3D(86,191,68,20,0xFFFFFF,0xC7C7C7);}*/ |
37 | |
- | 38 | break; |
|
34 | break; |
39 | |
- | 40 | case evButton: |
|
35 | 41 | id=GetButtonID(); |
|
36 | case evButton: |
42 | if (id==1) ExitProcess(); |
37 | id=GetButtonID(); |
43 | _BUTTON_MARK: |
Line 38... | Line 44... | ||
38 | if (id==1) ExitProcess(); |
44 | if (id==10) WB1.Scan(52); //View html code |
39 | if (id==10) WB1.Scan(52); //View html code |
45 | if (id==11) WB1.Scan(53); //View html code |
Line 40... | Line 46... | ||
40 | if (id==11) break; |
46 | if (id==12) break; |
- | 47 | if (id==13) WB1.Scan(11); //KOI |
|
41 | if (id==12) WB1.Scan(11); //KOI |
48 | if (id==14) WB1.Scan(21); //UTF |
- | 49 | ||
- | 50 | ExitProcess(); |
|
- | 51 | break; |
|
- | 52 | ||
- | 53 | case evKey: |
|
- | 54 | key = GetKey(); |
|
- | 55 | if (key==27) ExitProcess(); |
|
- | 56 | if (key==178) && (items_cur) |
|
- | 57 | { |
|
- | 58 | items_cur--; |
|
- | 59 | goto _ITEMS_DRAW; |
|
- | 60 | } |
|
- | 61 | if (key==177) && (items_cur+1 |
|
- | 62 | { |
|
- | 63 | items_cur++; |
|
- | 64 | goto _ITEMS_DRAW; |
|
42 | if (id==13) WB1.Scan(21); //UTF |
65 | } |
Line 43... | Line 66... | ||
43 | 66 | if (key==13) |
|
44 | ExitProcess(); |
67 | { |
45 | break; |
68 | id=items_cur+10; |
Line 46... | Line 69... | ||
46 | 69 | //WriteDebug(IntToStr(id)); |
|
47 | case evKey: |
70 | goto _BUTTON_MARK; |
48 | if (GetKey()==27) ExitProcess(); |
71 | } |
49 | break; |
72 | break; |
50 | 73 | ||
- | 74 | case evReDraw: |
|
- | 75 | for (items_num=0; ITEMS_LIST[items_num]<>0; items_num++;) {}; |
|
51 | case evReDraw: |
76 | DefineAndDrawWindow(Form.left+m.x,Form.top+m.y+GetSkinWidth()+3,ITEM_WIDTH,items_num*ITEM_HEIGHT+1,0x01,0x10FFFFFF,0,0,0); |
52 | for (items_num=0; ITEMS_LIST[items_num]<>0; items_num++;) {}; |
77 | |
53 | DefineAndDrawWindow(Form.left+m.x,Form.top+m.y+GetSkinWidth()+3,ITEM_WIDTH,items_num*ITEM_HEIGHT,0x01,0x10FFFFFF,0,0,0); |
78 | DrawRegion(0,0,ITEM_WIDTH,items_num*ITEM_HEIGHT+1,0x777777); //îáîäîê |
54 | 79 | _ITEMS_DRAW: |
|
55 | DrawRegion(0,0,ITEM_WIDTH,items_num*ITEM_HEIGHT,0x777777); //îáîäîê |
80 | for (i=0; i |