Subversion Repositories Kolibri OS

Rev

Rev 9516 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9516 Rev 9576
Line 81... Line 81...
81
{
81
{
82
	#define padding_v 5
82
	#define padding_v 5
83
	#define padding_h 15
83
	#define padding_h 15
84
	#define right_margin 12
84
	#define right_margin 12
85
	#define h padding_v + padding_v + 16 //16 font height
85
	#define h padding_v + padding_v + 16 //16 font height
86
	int tx = x + padding_h;
-
 
87
	int ty = y + padding_v+1;
-
 
88
	int tw = strlen(text)*8;
86
	int tw = strlen(text)*8;
89
	int w = tw + padding_h + padding_h;
87
	int w = tw + padding_h + padding_h;
90
	unsigned darker_color = MixColors(sc.button,0,230);
88
	unsigned darker_color = MixColors(sc.button,0,230);
Line 91... Line 89...
91
 
89
 
Line -... Line 90...
-
 
90
	DefineButton(x,y,w,h,id,sc.button);
-
 
91
 
-
 
92
	x += padding_h;
92
	DefineButton(x,y,w,h,id,sc.button);
93
	y += padding_v+1;
93
 
94
 
Line 94... Line 95...
94
	WriteText(tx+1,ty+1,0x90,darker_color,text);
95
	WriteText(x+1,y+1,0x90,darker_color,text);
-
 
96
	WriteText(x,y,0x90,sc.button_text,text);
95
	WriteText(tx,ty,0x90,sc.button_text,text);
97
 
96
 
98
	if (active_button_id==id) {
97
	if (active_button_id==id) {
99
		
Line 98... Line 100...
98
		DrawBar(tx,ty+15,tw,1, darker_color);
100
		DrawBar(x,y+15,tw,1, darker_color);
99
		DrawBar(tx,ty+14,tw,1, sc.button_text);
101
		DrawBar(x,y+14,tw,1, sc.button_text);
Line 150... Line 152...
150
}
152
}
Line 151... Line 153...
151
 
153
 
152
#define DOT_W 37 
154
#define DOT_W 37 
153
:void DrawFileBox(dword edit_box_pointer, title, btn)
155
:void DrawFileBox(dword edit_box_pointer, title, btn)
154
{
156
{
155
	dword x,y,w,h,bg,t;
157
	dword x,y,w,bg,t;
156
	ESI = edit_box_pointer;
158
	ESI = edit_box_pointer;
157
	x = ESI.edit_box.left;
159
	x = ESI.edit_box.left;
158
	y = ESI.edit_box.top;
160
	y = ESI.edit_box.top;
159
	w = ESI.edit_box.width+1;
161
	w = ESI.edit_box.width+1;
Line 160... Line 162...
160
	h = 22;
162
	#define box_h 22
161
 
163
 
162
	if (ESI.edit_box.flags & 100000000000b) bg = 0xCACACA; else bg = 0xFFFfff;
164
	if (ESI.edit_box.flags & 100000000000b) bg = 0xCACACA; else bg = 0xFFFfff;
163
	edit_box_draw  stdcall (edit_box_pointer);
165
	edit_box_draw  stdcall (edit_box_pointer);
164
	DrawRectangle3D(x-1, y-1, w+1, h+1, 0xE7E7E7, bg);
166
	DrawRectangle3D(x-1, y-1, w+1, box_h+1, 0xE7E7E7, bg);
Line 165... Line 167...
165
	DrawRectangle(x-2, y-2, w+3, h+3, sc.work_graph);
167
	DrawRectangle(x-2, y-2, w+3, box_h+3, sc.work_graph);
166
	DrawRectangle3D(x-3, y-3, w+DOT_W+5, h+5, sc.work_dark, sc.work_light);
168
	DrawRectangle3D(x-3, y-3, w+DOT_W+5, box_h+5, sc.work_dark, sc.work_light);
167
 
169
 
Line 168... Line 170...
168
	WriteText(x-2, y-19, 0x90, sc.work_text, title);
170
	WriteText(x-2, y-19, 0x90, sc.work_text, title);
169
	DrawCaptButton(x+w+1, y-2, DOT_W, h+3, btn, sc.button, sc.button_text, "...");
171
	DrawCaptButton(x+w+1, y-2, DOT_W, box_h+3, btn, sc.button, sc.button_text, "...");
170
}
172
}