Subversion Repositories Kolibri OS

Rev

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

Rev 6193 Rev 6197
Line 65... Line 65...
65
        px = py / r + px;
65
        px = py / r + px;
66
        py = -px / r + py;
66
        py = -px / r + py;
67
	}
67
	}
68
}
68
}
Line -... Line 69...
-
 
69
 
-
 
70
unsigned char checkbox_flag[507] = {
-
 
71
	0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 
-
 
72
	0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xD4, 
-
 
73
	0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xDC, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 
-
 
74
	0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 
-
 
75
	0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xB4, 0x04, 0xFC, 0xDC, 
-
 
76
	0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xBC, 0x04, 
-
 
77
	0xFC, 0xBC, 0x04, 0xFC, 0xBC, 0x04, 0xFC, 0xB4, 0x04, 0xFC, 0xA9, 0x04, 0xFC, 0xA9, 0x04, 0xFC, 
-
 
78
	0xB4, 0x04, 0xFC, 0xB4, 0x04, 0xFC, 0xD4, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 0x04, 0xFC, 0xC8, 
-
 
79
	0x04, 0xFC, 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 
100
	0x04, 0xF9, 0x98, 0x04, 0xFC, 0xB4, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 
-
 
101
	0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 
-
 
102
	0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04, 0xF9, 0x98, 0x04
-
 
103
};
69
 
104
 
70
:void CheckBox(dword x,y,bt_id, text, is_checked)
105
:void CheckBox(dword x,y,bt_id, text, is_checked)
71
{
106
{
72
	byte w=14, h=14;
107
	byte w=14, h=14;
73
	DefineButton(x-1, y-1, strlen(text)*6 + w + 17, h+2, bt_id+BT_HIDE+BT_NOFRAME, 0);
108
	DefineButton(x-1, y-1, strlen(text)*8 + w + 17, h+2, bt_id+BT_HIDE+BT_NOFRAME, 0);
74
	WriteText(x+w+8, h / 2 + y -3, 0x80, system.color.work_text, text);
109
	WriteText(x+w+8, h / 2 + y -7, 0x90, system.color.work_text, text);
75
	DrawRectangle(x, y, w, h, system.color.work_graph);
110
	DrawRectangle(x, y, w, h, system.color.work_graph);
76
	if (is_checked == 0)
111
	if (is_checked == 0)
77
	{
112
	{
78
		DrawRectangle3D(x+1, y+1, w-2, h-2, 0xDDDddd, 0xffffff);
113
		DrawRectangle3D(x+1, y+1, w-2, h-2, 0xDDDddd, 0xffffff);
79
		DrawBar(x+2, y+2, w-3, h-3, 0xffffff);
114
		DrawBar(x+2, y+2, w-3, h-3, 0xffffff);
80
	} 
115
	} 
81
	else if (is_checked == 1)
116
	else if (is_checked == 1)
82
	{
117
	{
83
		DrawWideRectangle(x+1, y+1, w-1, h-1, 2, 0xffffff);
118
		DrawWideRectangle(x+1, y+1, w-1, h-1, 2, 0xffffff);
84
		DrawBar(x+3, y+3, w-5, h-5, 0x00C000); //0x13A113
119
		_PutImage(x+1, y+1, 13, 13, #checkbox_flag);
85
	}
120
	}
86
	else if (is_checked == 2) //not active
121
	else if (is_checked == 2) //not active
87
	{
122
	{
88
		DrawWideRectangle(x+1, y+1, w-1, h-1, 2, 0xffffff);
123
		DrawWideRectangle(x+1, y+1, w-1, h-1, 2, 0xffffff);
Line 101... Line 136...
101
	DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff);
136
	DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff);
102
	WriteText(x+6, SIZE / 2 + y -3, 0x80, 0x000000, itoa(value));
137
	WriteText(x+6, SIZE / 2 + y -3, 0x80, 0x000000, itoa(value));
Line 103... Line 138...
103
 
138
 
104
	DrawCaptButton(VALUE_FIELD_W + x,     y, SIZE, SIZE, bt_id_more, system.color.work_button, system.color.work_button_text, "+");
139
	DrawCaptButton(VALUE_FIELD_W + x,     y, SIZE, SIZE, bt_id_more, system.color.work_button, system.color.work_button_text, "+");
105
	DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, bt_id_less, system.color.work_button, system.color.work_button_text, "-");
140
	DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, bt_id_less, system.color.work_button, system.color.work_button_text, "-");
106
	WriteText(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -3, 0x80, system.color.work_text, text);
141
	WriteText(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0x90, system.color.work_text, text);
107
	DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light);
142
	DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light);
Line 108... Line 143...
108
}
143
}
109
 
144
 
Line 214... Line 249...
214
	ESBYTE[next_word_pointer] = NULL;
249
	ESBYTE[next_word_pointer] = NULL;
215
	WriteText(dword x, y, byte fontType, dword color, text_pointer);
250
	WriteText(dword x, y, byte fontType, dword color, text_pointer);
216
	ESBYTE[next_word_pointer] = '\n';
251
	ESBYTE[next_word_pointer] = '\n';
217
}
252
}
Line -... Line 253...
-
 
253
 
-
 
254
//this function increase falue and return it
-
 
255
//useful for list of controls which goes one after one
-
 
256
struct incn
-
 
257
{
-
 
258
	dword n;
-
 
259
	dword inc(dword _addition);
-
 
260
};
-
 
261
 
-
 
262
dword incn::inc(dword _addition)
-
 
263
{
-
 
264
	n+=_addition;
-
 
265
	return n;
-
 
266
}
218
 
267
 
219
#endif
268
#endif