Rev 7866 | Rev 8789 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7866 | Rev 7910 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | unsigned int DrawTopPanelButton(dword _button_id, _x, _y, signed int _icon_n) |
1 | unsigned int DrawTopPanelButton(dword _button_id, _x, _y, signed int _icon_n, bool pressed) |
2 | { |
2 | { |
3 | #define TSZE 25 |
3 | #define TSZE 25 |
4 | static libimg_image top_icons; |
4 | static libimg_image top_icons; |
5 | static dword semi_white=0, bg_col_light, bg_col_dark; |
5 | static dword semi_white=0, bg_col_light, bg_col_dark; |
6 | int i; |
6 | int i; |
Line 15... | Line 15... | ||
15 | Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffCACBD6, MixColors(semi_white, 0, 220)); |
15 | Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffCACBD6, MixColors(semi_white, 0, 220)); |
16 | } |
16 | } |
17 | 17 | ||
Line 18... | Line 18... | ||
18 | DrawWideRectangle(_x+1, _y+1, TSZE, TSZE, 5, semi_white); |
18 | DrawWideRectangle(_x+1, _y+1, TSZE, TSZE, 5, semi_white); |
19 | DrawOvalBorder(_x, _y, TSZE, TSZE, bg_col_light, bg_col_dark, semi_white, sc.work); |
- | |
Line 20... | Line 19... | ||
20 | 19 | ||
21 | DefineHiddenButton(_x, _y, TSZE+1, TSZE+1, _button_id); |
20 | DefineHiddenButton(_x, _y, TSZE+1, TSZE+1, _button_id); |
22 | if (_icon_n==-1) { |
21 | if (_icon_n==-1) { |
23 | DrawBar(_x+6, _y+5, 16, 16, semi_white); |
22 | DrawBar(_x+6, _y+5, 16, 16, semi_white); |
24 | for (i=0; i<=2; i++) DrawBar(_x+6, i*5+_y+7, 15, 3, sc.work_graph); |
23 | for (i=0; i<=2; i++) DrawBar(_x+6, i*5+_y+7, 15, 3, sc.work_graph); |
25 | } else { |
24 | } else { |
- | 25 | img_draw stdcall(top_icons.image, _x+6, _y+5+pressed, 16, 16, 0, _icon_n*16); |
|
- | 26 | } |
|
- | 27 | ||
- | 28 | if (!pressed) { |
|
- | 29 | DrawOvalBorder(_x, _y, TSZE, TSZE, bg_col_light, bg_col_dark, semi_white, sc.work); |
|
- | 30 | } else { |
|
- | 31 | DrawOvalBorder(_x, _y, TSZE, TSZE, sc.work_graph, bg_col_light, semi_white, sc.work); |
|
26 | img_draw stdcall(top_icons.image, _x+6, _y+5, 16, 16, 0, _icon_n*16); |
32 | PutShadow(_x+1, _y+1, TSZE, TSZE, true, 2); |
- | 33 | } |
|
27 | } |
34 | |
28 | return _x; |
35 | return _x; |
29 | }=2;> |
36 | }=2;> |