Rev 6931 | Rev 7086 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6931 | Rev 7031 | ||
---|---|---|---|
Line 48... | Line 48... | ||
48 | if (id>0) DefineButton(x,y,w,h,id,color_b); |
48 | if (id>0) DefineButton(x,y,w,h,id,color_b); |
49 | WriteText(tx+1,ty+1,0x90,MixColors(color_b,0,230),text); |
49 | WriteText(tx+1,ty+1,0x90,MixColors(color_b,0,230),text); |
50 | WriteText(tx,ty,0x90,color_t,text); |
50 | WriteText(tx,ty,0x90,color_t,text); |
51 | } |
51 | } |
Line -... | Line 52... | ||
- | 52 | ||
52 | 53 | :int active_button_id = 0; |
|
53 | :int DrawStandartCaptButton(dword x, y, id, text) |
54 | :int DrawStandartCaptButton(dword x, y, id, text) |
54 | { |
55 | { |
55 | int padding_v = 5; |
56 | int padding_v = 5; |
56 | int padding_h = 15; |
57 | int padding_h = 15; |
57 | int right_margin = 12; |
58 | int right_margin = 12; |
58 | int tx = x + padding_h; |
59 | int tx = x + padding_h; |
- | 60 | int ty = y + padding_v+1; |
|
59 | int ty = y + padding_v+1; |
61 | int tw = strlen(text)*8; |
60 | int h = padding_v + padding_v + 16; //16 font height |
62 | int h = padding_v + padding_v + 16; //16 font height |
- | 63 | int w = tw + padding_h + padding_h; |
|
Line 61... | Line 64... | ||
61 | int w = strlen(text)*8 + padding_h + padding_h; |
64 | |
- | 65 | ||
62 | 66 | if (id>0) DefineButton(x,y,w,h,id,system.color.work_button); |
|
63 | if (id>0) DefineButton(x,y,w,h,id,system.color.work_button); |
67 | |
- | 68 | WriteText(tx+1,ty+1,0x90,MixColors(system.color.work_button,0,230),text); |
|
- | 69 | WriteText(tx,ty,0x90,system.color.work_button_text,text); |
|
- | 70 | ||
- | 71 | if (active_button_id==id) { |
|
- | 72 | DrawBar(tx,ty+15,tw,1, MixColors(system.color.work_button,0,230)); |
|
- | 73 | DrawBar(tx,ty+14,tw,1, system.color.work_button_text); |
|
64 | WriteText(tx+1,ty+1,0x90,MixColors(system.color.work_button,0,230),text); |
74 | } |
65 | WriteText(tx,ty,0x90,system.color.work_button_text,text); |
75 | |
Line -... | Line 76... | ||
- | 76 | return w + right_margin; |
|
- | 77 | } |
|
- | 78 | ||
- | 79 | :void ActiveButtonSwitch(int min, max) |
|
- | 80 | { |
|
- | 81 | active_button_id++; |
|
66 | return w + right_margin; |
82 | if (active_button_id>max) || (active_button_id |
67 | } |
83 | } |
68 | 84 | ||
69 | :void WriteTextCenter(dword x,y,w,color_t,text) |
85 | :void WriteTextCenter(dword x,y,w,color_t,text) |
Line 198... | Line 214... | ||
198 | 214 | ||
199 | :void DrawLink(dword x,y,font_type,btn_id, inscription) |
215 | :void DrawLink(dword x,y,font_type,btn_id, inscription) |
200 | { |
216 | { |
201 | int w; |
217 | int w; |
202 | WriteText(x,y,font_type,0x4E00E7,inscription); |
218 | WriteText(x,y,font_type,0x4E00E7,inscription); |
203 | if (font_type==0x80) w = strlen(inscription)*6; else w = strlen(inscription)*7; |
219 | if (font_type==0x80) w = strlen(inscription)*6; else w = strlen(inscription)*8; |
204 | DefineButton(x-1,y-1,w,10,btn_id+BT_HIDE,0); |
220 | DefineButton(x-1,y-1,w,10,btn_id+BT_HIDE,0); |
205 | DrawBar(x,y+8,w,1,0x4E00E7); |
221 | DrawBar(x,y+8,w,1,0x4E00E7); |
Line 206... | Line 222... | ||
206 | } |
222 | } |