Rev 5463 | Rev 5499 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5463 | Rev 5477 | ||
---|---|---|---|
Line 44... | Line 44... | ||
44 | :void CheckBox(dword x,y,w,h, bt_id, text, graph_color, text_color, is_checked) |
44 | :void CheckBox(dword x,y,w,h, bt_id, text, graph_color, text_color, is_checked) |
45 | { |
45 | { |
46 | DefineButton(x-1, y-1, strlen(text)*6 + w + 17, h+2, bt_id+BT_HIDE+BT_NOFRAME, graph_color); |
46 | DefineButton(x-1, y-1, strlen(text)*6 + w + 17, h+2, bt_id+BT_HIDE+BT_NOFRAME, graph_color); |
47 | WriteText(x+w+8, h / 2 + y -3, 0x80, text_color, text); |
47 | WriteText(x+w+8, h / 2 + y -3, 0x80, text_color, text); |
48 | DrawRectangle(x, y, w, h, graph_color); |
48 | DrawRectangle(x, y, w, h, graph_color); |
49 | if (is_checked == 1) |
49 | if (is_checked == 0) |
- | 50 | { |
|
- | 51 | DrawRectangle3D(x+1, y+1, w-2, h-2, 0xDDDddd, 0xffffff); |
|
- | 52 | DrawBar(x+2, y+2, w-3, h-3, 0xffffff); |
|
- | 53 | } |
|
- | 54 | else if (is_checked == 1) |
|
50 | { |
55 | { |
51 | DrawRectangle(x+1, y+1, w-2, h-2, 0xffffff); |
56 | DrawRectangle(x+1, y+1, w-2, h-2, 0xffffff); |
52 | DrawBar(x+2, y+2, w-3, h-3, graph_color); |
57 | DrawBar(x+2, y+2, w-3, h-3, graph_color); |
53 | return; //не дадим стрелять себе в ногу |
- | |
54 | } |
58 | } |
55 | if (is_checked == 2) //not active |
59 | else if (is_checked == 2) //not active |
56 | { |
60 | { |
57 | DrawRectangle(x+1, y+1, w-2, h-2, 0xffffff); |
61 | DrawRectangle(x+1, y+1, w-2, h-2, 0xffffff); |
58 | DrawBar(x+2, y+2, w-3, h-3, 0x888888); |
62 | DrawBar(x+2, y+2, w-3, h-3, 0x888888); |
59 | return; |
- | |
60 | } |
63 | } |
61 | else |
- | |
62 | { |
- | |
63 | DrawRectangle3D(x+1, y+1, w-2, h-2, 0xDDDddd, 0xffffff); |
- | |
64 | DrawBar(x+2, y+2, w-3, h-3, 0xffffff); |
- | |
65 | } |
64 | } |
- | 65 | ||
- | 66 | ||
- | 67 | :void MoreLessBox(dword x,y,s, bt_id_more, bt_id_less, color_border, color_button, color_text, value, text) |
|
- | 68 | { |
|
- | 69 | #define VALUE_FIELD_W 26; |
|
- | 70 | DrawRectangle(x, y, VALUE_FIELD_W, s, color_border); |
|
- | 71 | DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, s-2, 0xDDDddd, 0xffffff); |
|
- | 72 | DrawBar(x+2, y+2, VALUE_FIELD_W-3, s-3, 0xffffff); |
|
- | 73 | WriteText(x+6, s / 2 + y -3, 0x80, color_text, itoa(value)); |
|
- | 74 | ||
- | 75 | DrawCaptButton(VALUE_FIELD_W + x + 1, y, s, s, bt_id_more, color_button, color_text, "+"); |
|
- | 76 | DrawCaptButton(VALUE_FIELD_W + x + s + 2, y, s, s, bt_id_less, color_button, color_text, "-"); |
|
- | 77 | WriteText(x+VALUE_FIELD_W+s+s+10, s / 2 + y -3, 0x80, color_text, text); |
|
66 | } |
78 | } |
Line -... | Line 79... | ||
- | 79 | ||
67 | 80 | ||
68 | :void DrawProgressBar(dword st_x, st_y, st_w, st_h, col_fon, col_border, col_fill, col_text, progress_percent) |
81 | :void DrawProgressBar(dword st_x, st_y, st_w, st_h, col_fon, col_border, col_fill, col_text, progress_percent) |
69 | { |
82 | { |
70 | int progress_w; |
83 | int progress_w; |