Subversion Repositories Kolibri OS

Rev

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

Rev 5814 Rev 5817
Line 1... Line 1...
1
/*
1
/*
2
SOFTWARE CENTER v2.32
2
SOFTWARE CENTER v2.4
3
*/
3
*/
Line 4... Line 4...
4
 
4
 
5
#define MEMSIZE 0x9000
5
#define MEMSIZE 0x9000
6
#include "..\lib\strings.h" 
6
#include "..\lib\strings.h" 
Line 57... Line 57...
57
 
57
 
58
void main()
58
void main()
59
{   
59
{   
60
	dword id, key;
60
	dword id, key;
-
 
61
	font.load("/sys/fonts/Tahoma.kf");
-
 
62
	font.no_bg_copy = true;
61
	font.load("/sys/fonts/Tahoma.kf");
63
	font.smooth = true;
62
	load_dll(libio,  #libio_init,1);
64
	load_dll(libio,  #libio_init,1);
63
	load_dll(libimg, #libimg_init,1);
65
	load_dll(libimg, #libimg_init,1);
Line 64... Line 66...
64
	load_dll(libini, #lib_init,1);
66
	load_dll(libini, #lib_init,1);
Line 148... Line 150...
148
	//WriteTextCenter(col*cell_w+7,row*cell_h+47 + list_pos,cell_w,0xDCDCDC,key_name);
150
	//WriteTextCenter(col*cell_w+7,row*cell_h+47 + list_pos,cell_w,0xDCDCDC,key_name);
149
	//WriteTextCenter(col*cell_w+6,row*cell_h+46 + list_pos,cell_w,0x000000,key_name);
151
	//WriteTextCenter(col*cell_w+6,row*cell_h+46 + list_pos,cell_w,0x000000,key_name);
150
	font.size = 12;
152
	font.size = 12;
151
	font.color = 0xDCDCDC;
153
	font.color = 0xDCDCDC;
152
	font.weight = false;
154
	font.weight = false;
-
 
155
	font.bg_color = LIST_BACKGROUND_COLOR;
153
	font.textcenter(col*cell_w+7,row*cell_h+47 + list_pos,cell_w,0,key_name);
156
	font.textcenter(col*cell_w+7,row*cell_h+47 + list_pos,cell_w,0,key_name);
154
	font.show();
157
	font.show();
155
	font.color = 0;
158
	font.color = 0;
156
	font.textcenter(col*cell_w+6,row*cell_h+46 + list_pos,cell_w,0,key_name);
159
	font.textcenter(col*cell_w+6,row*cell_h+46 + list_pos,cell_w,0,key_name);
157
	font.show();
160
	font.show();
Line 161... Line 164...
161
}
164
}
Line 162... Line 165...
162
 
165
 
163
 
166
 
-
 
167
byte process_sections(dword sec_name, f_name)
164
byte process_sections(dword sec_name, f_name)
168
{
Line 165... Line 169...
165
{
169
	int text_len;
166
	if (!strcmp(sec_name, "Config")) return true;
170
	if (!strcmp(sec_name, "Config")) return true;
167
 
171
 
168
	if (item_id_need_to_run!=-1)
172
	if (item_id_need_to_run!=-1)
169
	{
173
	{
170
		ini_enum_keys stdcall (f_name, sec_name, #search_for_id_need_to_run);
174
		ini_enum_keys stdcall (f_name, sec_name, #search_for_id_need_to_run);
171
	}
175
	}
172
	else
176
	else
173
	{
177
	{
174
		if ((col==0) && (row==old_row)) 
178
		if ((col==0) && (row==old_row)) 
175
		{
179
		{
176
			list_pos -= 25;
180
			list_pos -= 28;
177
		}
181
		}
178
		else
182
		else
179
		{
183
		{
180
			row++;
184
			row++;
181
		}
185
		}
182
		col = 0;
186
		col = 0;
183
		old_row = row;
187
		old_row = row;
184
		DrawBar(0, row * cell_h + list_pos, Form.cwidth , 26, LIST_BACKGROUND_COLOR);
188
		DrawBar(0, row * cell_h + list_pos, Form.cwidth , 29, LIST_BACKGROUND_COLOR);
-
 
189
		//WriteTextB(10, row * cell_h + 9 + list_pos, 0x90, 0x000000, sec_name);
185
		//WriteTextB(10, row * cell_h + 9 + list_pos, 0x90, 0x000000, sec_name);
190
		font.size=14;
186
		font.size=14;
191
		font.weight=true;
-
 
192
		font.bg_color = LIST_BACKGROUND_COLOR;
-
 
193
		text_len = font.prepare(10, row * cell_h + 10 + list_pos,sec_name);
187
		font.weight = true;
194
		font.show();
188
		font.prepare(10, row * cell_h + 9 + list_pos,sec_name);
195
		DrawBar(text_len+20, row * cell_h + list_pos + 20, Form.cwidth-text_len-20, 1, 0xDCDCDC);
189
		font.show();
196
		DrawBar(text_len+20, row * cell_h + list_pos + 21, Form.cwidth-text_len-20, 1, 0xFCFCFC);
190
		list_pos += 26;
197
		list_pos += 29;
191
		ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section);
198
		ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section);
Line 192... Line 199...
192
	}
199
	}
193
	return true;
200
	return true;
194
}
201
}
195
 
202
 
196
void draw_top_bar()
203
void draw_top_bar()
197
{
-
 
198
	int top_position = 26;
204
{
199
	DrawBar(0,0,Form.cwidth, top_position-1, system.color.work);
-
 
200
	DrawBar(0,top_position-1, Form.cwidth, 1, system.color.work_graph);
-
 
201
	//WriteTextB(Form.cwidth/2-70, 9, 0x90, system.color.work_text, #window_title);
-
 
202
	font.size = 19;
205
	int top_position = 26;
203
	font.getsize(#window_title);
206
	DrawBar(0,0,Form.cwidth, top_position-1, system.color.work);
-
 
207
	DrawBar(0,top_position-1, Form.cwidth, 1, system.color.work_graph);
204
	ECX = EAX/2;
208
	font.size = 17;
205
	EBX = Form.cwidth/2-ECX;
209
	font.weight = false;
206
	font.weight = false;
210
	font.bg_color = system.color.work;
207
	font.prepare(EBX,0,#window_title);
211
	font.prepare(Form.cwidth-font.getsize(#window_title)/2,0,#window_title);
208
	font.show();
212
	font.show();