Rev 3076 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3076 | Rev 3106 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | } |
15 | } |
Line 16... | Line 16... | ||
16 | 16 | ||
17 | void DrawCaptButton(dword x,y,width,height,id,color_b, color_t,text,text_len) |
17 | void DrawCaptButton(dword x,y,width,height,id,color_b, color_t,text,text_len) |
18 | { |
18 | { |
19 | DefineButton(x,y,width,height,id,color_b); |
19 | DefineButton(x,y,width,height,id,color_b); |
20 | WriteText(-text_len*6+width/2+x+1,height/2-3+y,0x80,color_t,text,0); |
20 | WriteText(-text_len*6+width/2+x+1,height/2-3+y,0x80,color_t,text); |
Line 21... | Line 21... | ||
21 | } |
21 | } |
22 | 22 | ||
23 | void DrawCircle(int x, y, r) |
23 | void DrawCircle(int x, y, r) |
Line 29... | Line 29... | ||
29 | PutPixel(px + x, y - py, 0); |
29 | PutPixel(px + x, y - py, 0); |
30 | px = py / r + px; |
30 | px = py / r + px; |
31 | py = -px / r + py; |
31 | py = -px / r + py; |
32 | } |
32 | } |
33 | }> |
33 | } |
- | 34 | ||
- | 35 | void CheckBox(dword x,y,w,h, bt_id, text, graph_color, text_color, is_checked) |
|
- | 36 | { |
|
- | 37 | DefineButton(x-1, y-1, strlen(text)*6 + w + 17, h+2, bt_id+BT_HIDE+BT_NOFRAME, graph_color); |
|
- | 38 | WriteText(x+w+10, h / 2 + y -3, 0x80, text_color, text); |
|
- | 39 | DrawRectangle(x, y, w, h, graph_color); |
|
- | 40 | if (is_checked == 1) |
|
- | 41 | { |
|
- | 42 | DrawRectangle(x+1, y+1, w-2, h-2, 0xffffff); |
|
- | 43 | DrawBar(x+2, y+2, w-3, h-3, graph_color); |
|
- | 44 | return; //не дадим стрелять себе в ногу |
|
- | 45 | } |
|
- | 46 | if (is_checked == 2) //not active |
|
- | 47 | { |
|
- | 48 | DrawRectangle(x+1, y+1, w-2, h-2, 0xffffff); |
|
- | 49 | DrawBar(x+2, y+2, w-3, h-3, 0x888888); |
|
- | 50 | return; |
|
- | 51 | } |
|
- | 52 | else |
|
- | 53 | { |
|
- | 54 | DrawRectangle3D(x+1, y+1, w-2, h-2, 0xDDDddd, 0xffffff); |
|
- | 55 | DrawBar(x+2, y+2, w-3, h-3, 0xffffff); |
|
- | 56 | } |
|
- | 57 | }> |
|
34 | 58 |