Rev 5775 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5775 | Rev 5814 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | SOFTWARE CENTER v2.32 |
2 | SOFTWARE CENTER v2.32 |
3 | */ |
3 | */ |
Line 4... | Line 4... | ||
4 | 4 | ||
5 | #define MEMSIZE 0x5000 |
5 | #define MEMSIZE 0x9000 |
6 | #include "..\lib\strings.h" |
6 | #include "..\lib\strings.h" |
7 | #include "..\lib\mem.h" |
7 | #include "..\lib\mem.h" |
8 | #include "..\lib\file_system.h" |
8 | #include "..\lib\file_system.h" |
Line 9... | Line 9... | ||
9 | #include "..\lib\gui.h" |
9 | #include "..\lib\gui.h" |
10 | 10 | ||
11 | #include "..\lib\obj\libio_lib.h" |
11 | #include "..\lib\obj\libio_lib.h" |
12 | #include "..\lib\obj\libimg_lib.h" |
- | |
- | 12 | #include "..\lib\obj\libimg_lib.h" |
|
13 | #include "..\lib\obj\libini.h" |
13 | #include "..\lib\obj\libini.h" |
Line 14... | Line 14... | ||
14 | 14 | #include "..\lib\font.h" |
|
Line 15... | Line 15... | ||
15 | #include "..\lib\patterns\libimg_load_skin.h" |
15 | #include "..\lib\patterns\libimg_load_skin.h" |
Line 56... | Line 56... | ||
56 | 56 | ||
57 | 57 | ||
58 | void main() |
58 | void main() |
59 | { |
- | |
- | 59 | { |
|
60 | dword id, key; |
60 | dword id, key; |
61 | 61 | font.load("/sys/fonts/Tahoma.kf"); |
|
62 | load_dll(libio, #libio_init,1); |
62 | load_dll(libio, #libio_init,1); |
Line 63... | Line 63... | ||
63 | load_dll(libimg, #libimg_init,1); |
63 | load_dll(libimg, #libimg_init,1); |
Line 143... | Line 143... | ||
143 | tmp = cell_w/2; |
143 | tmp = cell_w/2; |
Line 144... | Line 144... | ||
144 | 144 | ||
145 | icon_char_pos = strchr(key_value, ','); |
145 | icon_char_pos = strchr(key_value, ','); |
146 | if (icon_char_pos) icon_id = atoi(icon_char_pos+1); else icon_id = default_icon; |
146 | if (icon_char_pos) icon_id = atoi(icon_char_pos+1); else icon_id = default_icon; |
147 | img_draw stdcall(skin.image, col*cell_w+tmp-10, row*cell_h+5 + list_pos, 32, 32, 0, icon_id*32); |
147 | img_draw stdcall(skin.image, col*cell_w+tmp-10, row*cell_h+5 + list_pos, 32, 32, 0, icon_id*32); |
148 | WriteTextCenter(col*cell_w+7,row*cell_h+47 + list_pos,cell_w,0xDCDCDC,key_name); |
148 | //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); |
|
- | 150 | font.size = 12; |
|
- | 151 | font.color = 0xDCDCDC; |
|
- | 152 | font.weight = false; |
|
- | 153 | font.textcenter(col*cell_w+7,row*cell_h+47 + list_pos,cell_w,0,key_name); |
|
- | 154 | font.show(); |
|
- | 155 | font.color = 0; |
|
- | 156 | font.textcenter(col*cell_w+6,row*cell_h+46 + list_pos,cell_w,0,key_name); |
|
149 | WriteTextCenter(col*cell_w+6,row*cell_h+46 + list_pos,cell_w,0x000000,key_name); |
157 | font.show(); |
150 | current_item_id++; |
158 | current_item_id++; |
151 | col++; |
159 | col++; |
152 | return true; |
160 | return true; |
Line 163... | Line 171... | ||
163 | } |
171 | } |
164 | else |
172 | else |
165 | { |
173 | { |
166 | if ((col==0) && (row==old_row)) |
174 | if ((col==0) && (row==old_row)) |
167 | { |
175 | { |
168 | list_pos -= 20; |
176 | list_pos -= 25; |
169 | } |
177 | } |
170 | else |
178 | else |
171 | { |
179 | { |
172 | row++; |
180 | row++; |
173 | } |
181 | } |
174 | col = 0; |
182 | col = 0; |
175 | old_row = row; |
183 | old_row = row; |
176 | DrawBar(0, row * cell_h + list_pos, Form.cwidth , 20, LIST_BACKGROUND_COLOR); |
184 | DrawBar(0, row * cell_h + list_pos, Form.cwidth , 26, LIST_BACKGROUND_COLOR); |
177 | 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); |
- | 186 | font.size=14; |
|
- | 187 | font.weight = true; |
|
- | 188 | font.prepare(10, row * cell_h + 9 + list_pos,sec_name); |
|
- | 189 | font.show(); |
|
178 | list_pos += 20; |
190 | list_pos += 26; |
179 | ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section); |
191 | ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section); |
180 | } |
192 | } |
181 | return true; |
193 | return true; |
182 | } |
194 | } |
Line 183... | Line 195... | ||
183 | 195 | ||
184 | void draw_top_bar() |
196 | void draw_top_bar() |
185 | { |
197 | { |
186 | int top_position = 25; |
198 | int top_position = 26; |
187 | DrawBar(0,0,Form.cwidth, top_position-1, system.color.work); |
199 | DrawBar(0,0,Form.cwidth, top_position-1, system.color.work); |
188 | DrawBar(0,top_position-1, Form.cwidth, 1, system.color.work_graph); |
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; |
|
- | 203 | font.getsize(#window_title); |
|
- | 204 | ECX = EAX/2; |
|
- | 205 | EBX = Form.cwidth/2-ECX; |
|
- | 206 | font.weight = false; |
|
- | 207 | font.prepare(EBX,0,#window_title); |
|
189 | WriteTextB(Form.cwidth/2-70, 9, 0x90, system.color.work_text, #window_title); |
208 | font.show(); |
190 | list_top = top_position; |
209 | list_top = top_position; |
191 | list_pos = list_top; |
210 | list_pos = list_top; |
192 | row = -1; |
211 | row = -1; |