Rev 6589 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6589 | Rev 8581 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | 3 | ||
4 | typedef struct __attribute__ ((__packed__)) option_box_t { |
4 | typedef struct __attribute__ ((__packed__)) option_box_t { |
5 | struct option_box_t **selected; |
5 | struct option_box_t **selected; |
6 | uint16_t posx; |
6 | uint16_t posx; |
7 | uint16_t posy; |
7 | uint16_t posy; |
8 | uint32_t text_margin; // = 4 ðàññòîÿíèå îò ïðÿìîóãîëüíèêà ÷åê áîêñà äî íàäïèñè |
8 | uint32_t text_margin; // = 4 ���������� �� �������������� ��� ����� �� ������� |
9 | uint32_t size; // 12 ðàçìåð êâàäðàòà ÷åê áîêñà |
9 | uint32_t size; // 12 ������ �������� ��� ����� |
10 | color_t color; |
10 | color_t color; |
11 | color_t border_color; // individual border |
11 | color_t border_color; // individual border |
12 | color_t text_color; |
12 | color_t text_color; |
13 | char *text; |
13 | char *text; |
Line 16... | Line 16... | ||
16 | }option_box; |
16 | }option_box; |
Line 17... | Line 17... | ||
17 | 17 | ||
18 | extern void (*option_box_draw)(option_box **) __attribute__((__stdcall__)); |
18 | extern void (*option_box_draw)(option_box **) __attribute__((__stdcall__)); |
Line 19... | Line 19... | ||
19 | extern void (*option_box_mouse)(option_box **)__attribute__((__stdcall__)); |
19 | extern void (*option_box_mouse)(option_box **)__attribute__((__stdcall__)); |
20 | 20 | ||
21 | inline option_box* gui_optionbox(option_box* ob, uint32_t x_y, char* text, option_box**select) |
21 | static inline option_box* gui_optionbox(option_box* ob, uint32_t x_y, char* text, option_box**select) |
22 | { |
22 | { |
23 | ob->selected = select; |
23 | ob->selected = select; |
24 | ob->posx = x_y >> 16; |
24 | ob->posx = x_y >> 16; |
Line 33... | Line 33... | ||
33 | ob->flags = 0; // not used |
33 | ob->flags = 0; // not used |
Line 34... | Line 34... | ||
34 | 34 | ||
35 | return ob; |
35 | return ob; |
Line 36... | Line 36... | ||
36 | } |
36 | } |
37 | 37 | ||
38 | inline option_box* gui_new_optionbox(uint32_t x_y, char* text, option_box**select) |
38 | static inline option_box* gui_new_optionbox(uint32_t x_y, char* text, option_box**select) |
Line 39... | Line 39... | ||
39 | { |
39 | { |
40 | option_box* ob = malloc(sizeof(option_box)); |
40 | option_box* ob = malloc(sizeof(option_box)); |
Line 41... | Line 41... | ||
41 | 41 | ||
Line 42... | Line 42... | ||
42 | return gui_optionbox(ob, x_y, text, select); |
42 | return gui_optionbox(ob, x_y, text, select); |
Line 43... | Line 43... | ||
43 | } |
43 | } |
44 | 44 | ||
45 | #define gui_optionbox_def(a,b,c,d) gui_optionbox(a,b,c,d) |
45 | #define gui_optionbox_def(a,b,c,d) gui_optionbox(a,b,c,d) |
46 | 46 |