Rev 6278 | Rev 6631 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6278 | Rev 6567 | ||
---|---|---|---|
Line 49... | Line 49... | ||
49 | if (id>0) DefineButton(x,y,w,h,id,color_b); |
49 | if (id>0) DefineButton(x,y,w,h,id,color_b); |
50 | WriteText(tx+1,ty+1,0x90,MixColors(color_b,0,230),text); |
50 | WriteText(tx+1,ty+1,0x90,MixColors(color_b,0,230),text); |
51 | WriteText(tx,ty,0x90,color_t,text); |
51 | WriteText(tx,ty,0x90,color_t,text); |
52 | } |
52 | } |
Line -... | Line 53... | ||
- | 53 | ||
- | 54 | :int DrawStandartCaptButton(dword x, y, id, color_b, color_t, text) |
|
- | 55 | { |
|
- | 56 | int padding_v = 5; |
|
- | 57 | int padding_h = 15; |
|
- | 58 | int right_margin = 12; |
|
- | 59 | int tx = x + padding_h; |
|
- | 60 | int ty = y + padding_v; |
|
- | 61 | int h = padding_v + padding_v + 16; //16 font height |
|
- | 62 | int w = strlen(text)*8 + padding_h + padding_h; |
|
- | 63 | ||
- | 64 | if (id>0) DefineButton(x,y,w,h,id,color_b); |
|
- | 65 | WriteText(tx+1,ty+1,0x90,MixColors(color_b,0,230),text); |
|
- | 66 | WriteText(tx,ty,0x90,color_t,text); |
|
- | 67 | return w + right_margin; |
|
- | 68 | } |
|
53 | 69 | ||
54 | :void WriteTextCenter(dword x,y,w,color_t,text) |
70 | :void WriteTextCenter(dword x,y,w,color_t,text) |
55 | { |
71 | { |
56 | WriteText(-strlen(text)*6+w/2+x+1,y,0x80,color_t,text); |
72 | WriteText(-strlen(text)*6+w/2+x+1,y,0x80,color_t,text); |