Rev 7493 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7493 | Rev 7605 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | SOFTWARE CENTER v2.81 |
2 | SOFTWARE CENTER v2.85 |
3 | */ |
3 | */ |
Line 4... | Line 4... | ||
4 | 4 | ||
5 | #define MEMSIZE 4096 * 15 |
5 | #define MEMSIZE 4096 * 15 |
6 | #include "..\lib\strings.h" |
6 | #include "..\lib\strings.h" |
Line 29... | Line 29... | ||
29 | default_icon; |
29 | default_icon; |
Line 30... | Line 30... | ||
30 | 30 | ||
31 | char window_title[128], |
31 | char window_title[128], |
Line -... | Line 32... | ||
- | 32 | settings_ini_path[256] = "/sys/settings/"; |
|
- | 33 | ||
32 | settings_ini_path[256] = "/sys/settings/"; |
34 | bool small_screen = false; |
Line 33... | Line 35... | ||
33 | 35 | ||
Line 34... | Line 36... | ||
34 | #define LIST_BACKGROUND_COLOR 0xF3F3F3 |
36 | #define LIST_BACKGROUND_COLOR 0xF3F3F3 |
Line 75... | Line 77... | ||
75 | list.cur_y = -1; |
77 | list.cur_y = -1; |
76 | list.y = 32; |
78 | list.y = 32; |
Line 77... | Line 79... | ||
77 | 79 | ||
78 | DrawList(); |
80 | DrawList(); |
- | 81 | window_height = row+1*list.item_h + list_pos + skin_height + 15; |
|
- | 82 | if (window_height>screen.height) { |
|
- | 83 | window_width = screen.width; |
|
- | 84 | list.item_h -= 5; |
|
- | 85 | window_height = row+1*list.item_h + list_pos + skin_height + 15; |
|
- | 86 | small_screen = true; |
|
Line 79... | Line 87... | ||
79 | window_height = row+1*list.item_h + list_pos + skin_height + 15; |
87 | } |
80 | 88 | ||
81 | loop() switch(WaitEvent()) |
89 | loop() switch(WaitEvent()) |
82 | { |
90 | { |
Line 96... | Line 104... | ||
96 | 104 | ||
97 | case evReDraw: |
105 | case evReDraw: |
98 | system.color.get(); |
106 | system.color.get(); |
99 | DefineAndDrawWindow(screen.width-window_width/2,screen.height-window_height/2,window_width,window_height,0x74,system.color.work,"",0); |
107 | DefineAndDrawWindow(screen.width-window_width/2,screen.height-window_height/2,window_width,window_height,0x74,system.color.work,"",0); |
100 | GetProcessInfo(#Form, SelfInfo); |
108 | GetProcessInfo(#Form, SelfInfo); |
- | 109 | if (Form.status_window>2) { |
|
- | 110 | DrawTitle(#window_title); |
|
- | 111 | break; |
|
- | 112 | } |
|
- | 113 | if (small_screen) { |
|
- | 114 | DrawTitle(#window_title); |
|
- | 115 | list.y = 0; |
|
- | 116 | } else { |
|
101 | if (Form.status_window>2) { DrawTitle(#window_title); break; } else DrawTitle(""); |
117 | DrawTitle(NULL); |
- | 118 | draw_top_bar(); |
|
102 | draw_top_bar(); |
119 | } |
103 | DrawList(); |
120 | DrawList(); |
104 | DrawBar(0, row +1 * list.item_h + list_pos, Form.cwidth, -row - 1 * list.item_h - list_pos + Form.cheight, LIST_BACKGROUND_COLOR); |
- | |
105 | //if (list.cur_y == list.count) |
121 | DrawBar(0, row +1 * list.item_h + list_pos, Form.cwidth, -row - 1 * list.item_h - list_pos + Form.cheight, LIST_BACKGROUND_COLOR); |
106 | DrawSelection(); |
- | |
107 | break; |
122 | DrawSelection(); |
108 | } |
123 | } |
Line 109... | Line 124... | ||
109 | } |
124 | } |
110 | 125 | ||
Line 168... | Line 183... | ||
168 | { |
183 | { |
169 | row++; |
184 | row++; |
170 | } |
185 | } |
171 | col = 0; |
186 | col = 0; |
172 | old_row = row; |
187 | old_row = row; |
- | 188 | ||
- | 189 | if (!small_screen) { |
|
173 | DrawBar(0, row * list.item_h + list_pos, Form.cwidth , 29, LIST_BACKGROUND_COLOR); |
190 | DrawBar(0, row * list.item_h + list_pos, Form.cwidth , 29, LIST_BACKGROUND_COLOR); |
174 | text_len = kfont.WriteIntoWindow(10, row * list.item_h + 10 + list_pos, LIST_BACKGROUND_COLOR, 0, 15, sec_name); |
191 | text_len = kfont.WriteIntoWindow(10, row * list.item_h + 10 + list_pos, LIST_BACKGROUND_COLOR, 0, 15, sec_name); |
175 | DrawBar(text_len+20, row * list.item_h + list_pos + 20, Form.cwidth-text_len-20, 1, 0xDCDCDC); |
192 | DrawBar(text_len+20, row * list.item_h + list_pos + 20, Form.cwidth-text_len-20, 1, 0xDCDCDC); |
176 | DrawBar(text_len+20, row * list.item_h + list_pos + 21, Form.cwidth-text_len-20, 1, 0xFCFCFC); |
193 | DrawBar(text_len+20, row * list.item_h + list_pos + 21, Form.cwidth-text_len-20, 1, 0xFCFCFC); |
177 | list_pos += 29; |
194 | list_pos += 29; |
- | 195 | } |
|
178 | ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section); |
196 | ini_enum_keys stdcall (f_name, sec_name, #draw_icons_from_section); |
179 | return true; |
197 | return true; |
180 | } |
198 | } |
Line 181... | Line 199... | ||
181 | 199 |