Rev 5811 | Rev 6191 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5811 | Rev 5825 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | if (strlen(file_captions[index])>menu.w) menu.w = strlen(file_captions[index]); |
62 | if (strlen(file_captions[index])>menu.w) menu.w = strlen(file_captions[index]); |
63 | menu.count++; |
63 | menu.count++; |
64 | menu.visible++; |
64 | menu.visible++; |
65 | } |
65 | } |
66 | menu.w = menu.w + 3 * menu.font_w + 50; |
66 | menu.w = menu.w + 3 * menu.font_w + 50; |
67 | menu.h = menu.count * menu.line_h; |
67 | menu.h = menu.count * menu.item_h; |
68 | SetEventMask(100111b); |
68 | SetEventMask(100111b); |
69 | goto _MENU_DRAW; |
69 | goto _MENU_DRAW; |
Line 70... | Line 70... | ||
70 | 70 | ||
71 | loop() switch(WaitEvent()) |
71 | loop() switch(WaitEvent()) |
Line 84... | Line 84... | ||
84 | if (menu.ProcessKey(key_scancode)) MenuListRedraw(); |
84 | if (menu.ProcessKey(key_scancode)) MenuListRedraw(); |
85 | break; |
85 | break; |
Line 86... | Line 86... | ||
86 | 86 | ||
87 | case evReDraw: _MENU_DRAW: |
87 | case evReDraw: _MENU_DRAW: |
88 | if (menu_call_mouse) DefineAndDrawWindow(mouse.x+Form.left+5, mouse.y+Form.top+GetSkinHeight(),menu.w+3,menu.h+6,0x01, 0, 0, 0x01fffFFF); |
88 | if (menu_call_mouse) DefineAndDrawWindow(mouse.x+Form.left+5, mouse.y+Form.top+GetSkinHeight(),menu.w+3,menu.h+6,0x01, 0, 0, 0x01fffFFF); |
89 | else DefineAndDrawWindow(Form.left+files.x+15, files.line_h*files.current+files.y+Form.top+30,menu.w+3,menu.h+6,0x01, 0, 0, 0x01fffFFF); |
89 | else DefineAndDrawWindow(Form.left+files.x+15, files.item_h*files.cur_y+files.y+Form.top+30,menu.w+3,menu.h+6,0x01, 0, 0, 0x01fffFFF); |
90 | GetProcessInfo(#MenuForm, SelfInfo); |
90 | GetProcessInfo(#MenuForm, SelfInfo); |
91 | DrawRectangle(0,0,menu.w+1,menu.h+2,system.color.work_graph); |
91 | DrawRectangle(0,0,menu.w+1,menu.h+2,system.color.work_graph); |
92 | DrawBar(1,1,menu.w,1,0xFFFfff); |
92 | DrawBar(1,1,menu.w,1,0xFFFfff); |
93 | DrawPopupShadow(1,1,menu.w,menu.h,0); |
93 | DrawPopupShadow(1,1,menu.w,menu.h,0); |
Line 100... | Line 100... | ||
100 | int start_y=0; |
100 | int start_y=0; |
101 | int index; |
101 | int index; |
102 | for (index=0; file_captions[index*3]!=0; index++) |
102 | for (index=0; file_captions[index*3]!=0; index++) |
103 | { |
103 | { |
104 | if ((itdir) && (file_captions[index*3+2]>=200)) continue; |
104 | if ((itdir) && (file_captions[index*3+2]>=200)) continue; |
105 | DrawBar(1,start_y+2,1,menu.line_h,0xFFFfff); |
105 | DrawBar(1,start_y+2,1,menu.item_h,0xFFFfff); |
106 | if (start_y/menu.line_h==menu.current) |
106 | if (start_y/menu.item_h==menu.cur_y) |
107 | { |
107 | { |
108 | cur_action_buf = file_captions[index*3+2]; |
108 | cur_action_buf = file_captions[index*3+2]; |
109 | DrawBar(2,start_y+2,menu.w-1,menu.line_h,0xFFFfff); |
109 | DrawBar(2,start_y+2,menu.w-1,menu.item_h,0xFFFfff); |
110 | } |
110 | } |
111 | else |
111 | else |
112 | { |
112 | { |
113 | DrawBar(2,start_y+2,menu.w-1,menu.line_h,system.color.work); |
113 | DrawBar(2,start_y+2,menu.w-1,menu.item_h,system.color.work); |
114 | WriteText(8,start_y+menu.text_y+4,menu.font_type,0xf2f2f2,file_captions[index*3]); |
114 | WriteText(8,start_y+menu.text_y+4,menu.font_type,0xf2f2f2,file_captions[index*3]); |
115 | } |
115 | } |
116 | WriteText(7, start_y + menu.text_y + 3, menu.font_type, system.color.work_text, file_captions[index*3]); |
116 | WriteText(7, start_y + menu.text_y + 3, menu.font_type, system.color.work_text, file_captions[index*3]); |
117 | WriteText(-strlen(file_captions[index*3+1])-1*menu.font_w + menu.w, start_y + menu.text_y + 3, menu.font_type, 0x888888, file_captions[index*3+1]); |
117 | WriteText(-strlen(file_captions[index*3+1])-1*menu.font_w + menu.w, start_y + menu.text_y + 3, menu.font_type, 0x888888, file_captions[index*3+1]); |
118 | start_y+=menu.line_h; |
118 | start_y+=menu.item_h; |
119 | } |
119 | } |
120 | } |
120 | } |
121 | 121 |