Rev 6651 | Rev 6662 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6651 | Rev 6653 | ||
---|---|---|---|
Line 64... | Line 64... | ||
64 | EventTabClick(SKINS); |
64 | EventTabClick(SKINS); |
65 | loop() switch(WaitEvent()) |
65 | loop() switch(WaitEvent()) |
66 | { |
66 | { |
67 | case evMouse: |
67 | case evMouse: |
68 | if (!CheckActiveProcess(Form.ID)) break; |
68 | if (!CheckActiveProcess(Form.ID)) break; |
69 | mouse.get(); |
- | |
70 | scrollbar_v_mouse (#scroll1); |
- | |
71 | if (select_list.first != scroll1.position) |
- | |
72 | { |
- | |
73 | select_list.first = scroll1.position; |
- | |
74 | DrawSelectList(select_list.count); |
69 | SelectList_ProcessMouse(); |
75 | break; |
- | |
76 | } |
- | |
77 | - | ||
78 | if (mouse.vert) && (select_list.MouseScroll(mouse.vert)) DrawSelectList(select_list.count); |
- | |
79 | - | ||
80 | if (mouse.up)&&(mouse_clicked) |
- | |
81 | { |
- | |
82 | if (mouse.lkm) && (select_list.ProcessMouse(mouse.x, mouse.y)) EventApply(); |
- | |
83 | mouse_clicked=false; |
- | |
84 | } |
- | |
85 | else if (mouse.down)&&(mouse.lkm) && (select_list.MouseOver(mouse.x, mouse.y)) mouse_clicked=true; |
- | |
Line 86... | Line 70... | ||
86 | 70 | ||
87 | if (mouse.down)&&(mouse.pkm) { |
71 | if (mouse.down)&&(mouse.pkm) { |
88 | select_list.ProcessMouse(mouse.x, mouse.y); |
72 | select_list.ProcessMouse(mouse.x, mouse.y); |
89 | DrawSelectList(select_list.count); |
73 | SelectList_Draw(); |
90 | menu.show(Form.left+mouse.x, Form.top+mouse.y+skin_height, 136, "Open file Enter\nDelete Del", 10); |
74 | menu.show(Form.left+mouse.x, Form.top+mouse.y+skin_height, 136, "Open file Enter\nDelete Del", 10); |
91 | } |
- | |
92 | 75 | } |
|
Line 93... | Line -... | ||
93 | break; |
- | |
94 | 76 | break; |
|
95 | 77 | ||
96 | case evButton: |
78 | case evButton: |
97 | id=GetButtonID(); |
79 | id=GetButtonID(); |
98 | if (id==1) ExitProcess(); |
80 | if (id==1) ExitProcess(); |
Line 135... | Line 117... | ||
135 | 117 | ||
136 | void DrawWindowContent() |
118 | void DrawWindowContent() |
137 | { |
119 | { |
138 | int id; |
120 | int id; |
- | 121 | id = select_list.cur_y; |
|
- | 122 | SelectList_Init( |
|
- | 123 | LIST_PADDING, |
|
139 | id = select_list.cur_y; |
124 | PANEL_H, |
- | 125 | Form.cwidth-scroll1.size_x-LIST_PADDING-LIST_PADDING, |
|
- | 126 | Form.cheight-PANEL_H-LIST_PADDING, |
|
- | 127 | false |
|
140 | InitSelectList(LIST_PADDING, PANEL_H, Form.cwidth-scroll1.size_x-LIST_PADDING-LIST_PADDING, Form.cheight-PANEL_H-LIST_PADDING, false); |
128 | ); |
Line 141... | Line 129... | ||
141 | select_list.cur_y = id; |
129 | select_list.cur_y = id; |
142 | 130 | ||
143 | DrawBar(0,0, Form.cwidth, PANEL_H-LIST_PADDING, system.color.work); |
131 | DrawBar(0,0, Form.cwidth, PANEL_H-LIST_PADDING, system.color.work); |
144 | DrawRectangle3D(select_list.x-2, select_list.y-2, select_list.w+3+scroll1.size_x, select_list.h+3, system.color.work_dark, system.color.work_light); |
132 | DrawRectangle3D(select_list.x-2, select_list.y-2, select_list.w+3+scroll1.size_x, select_list.h+3, system.color.work_dark, system.color.work_light); |
145 | DrawWideRectangle(select_list.x-LIST_PADDING, select_list.y-LIST_PADDING, LIST_PADDING*2+select_list.w+scroll1.size_x, LIST_PADDING*2+select_list.h, LIST_PADDING-2, system.color.work); |
133 | DrawWideRectangle(select_list.x-LIST_PADDING, select_list.y-LIST_PADDING, LIST_PADDING*2+select_list.w+scroll1.size_x, LIST_PADDING*2+select_list.h, LIST_PADDING-2, system.color.work); |
146 | tabs.draw(select_list.x+10, select_list.y, SKINS, T_SKINS); |
134 | tabs.draw(select_list.x+10, select_list.y, SKINS, T_SKINS); |
Line 147... | Line 135... | ||
147 | if (dir_exists(WALP_STANDART_PATH)) tabs.draw(strlen(T_SKINS)*8+TAB_PADDING+select_list.x+21, select_list.y, WALLPAPERS, T_WALLPAPERS); |
135 | if (dir_exists(WALP_STANDART_PATH)) tabs.draw(strlen(T_SKINS)*8+TAB_PADDING+select_list.x+21, select_list.y, WALLPAPERS, T_WALLPAPERS); |
148 | DrawRectangle(select_list.x-1, select_list.y-1, select_list.w+1+scroll1.size_x, select_list.h+1, system.color.work_graph); |
136 | DrawRectangle(select_list.x-1, select_list.y-1, select_list.w+1+scroll1.size_x, select_list.h+1, system.color.work_graph); |
Line 149... | Line 137... | ||
149 | 137 | ||
Line 169... | Line 157... | ||
169 | if (!strcmpi("default.skn",#temp_filename)) files_mas[0]> |
157 | if (!strcmpi("default.skn",#temp_filename)) files_mas[0]> |
170 | select_list.count++; |
158 | select_list.count++; |
171 | } |
159 | } |
172 | } |
160 | } |
Line 173... | Line 161... | ||
173 | 161 | ||
174 | void DrawSelectList_Line(dword i) |
162 | void SelectList_DrawLine(dword i) |
175 | { |
163 | { |
Line 176... | Line 164... | ||
176 | int yyy, list_last; |
164 | int yyy, list_last; |
177 | 165 | ||
Line 190... | Line 178... | ||
190 | DrawBar(select_list.x,yyy,select_list.w, select_list.item_h, 0xFFFfff); |
178 | DrawBar(select_list.x,yyy,select_list.w, select_list.item_h, 0xFFFfff); |
191 | WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,0, #temp_filename); |
179 | WriteText(select_list.x+12,yyy+select_list.text_y,select_list.font_type,0, #temp_filename); |
192 | } |
180 | } |
193 | } |
181 | } |
Line -... | Line 182... | ||
- | 182 | ||
- | 183 | void SelectList_LineChanged() |
|
- | 184 | { |
|
- | 185 | EventApply(); |
|
- | 186 | } |
|
194 | 187 | ||
195 | //===================================================// |
188 | //===================================================// |
196 | // // |
189 | // // |
197 | // EVENTS // |
190 | // EVENTS // |
198 | // // |
191 | // // |
Line 241... | Line 234... | ||
241 | if (tabs.active_tab==WALLPAPERS) |
234 | if (tabs.active_tab==WALLPAPERS) |
242 | { |
235 | { |
243 | cur = select_list.cur_y; |
236 | cur = select_list.cur_y; |
244 | sprintf(#cur_file_path,"\\S__%s/%s",#folder_path,io.dir.position(files_mas[cur])); |
237 | sprintf(#cur_file_path,"\\S__%s/%s",#folder_path,io.dir.position(files_mas[cur])); |
245 | RunProgram("/sys/media/kiv", #cur_file_path); |
238 | RunProgram("/sys/media/kiv", #cur_file_path); |
246 | DrawSelectList(select_list.count); |
239 | SelectList_Draw(); |
247 | } |
240 | } |
248 | } |
241 | } |
Line 249... | Line 242... | ||
249 | 242 | ||
250 | void EventOpenFile() |
243 | void EventOpenFile() |