forked from KolibriOS/kolibrios
cmm: bigger menu, Eolite: refrash folder on window redraw, fix breadcrumbs click
git-svn-id: svn://kolibrios.org@6782 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d3eb673c05
commit
d04f47d335
@ -71,7 +71,7 @@ void main()
|
|||||||
if (mouse.down)&&(mouse.pkm) {
|
if (mouse.down)&&(mouse.pkm) {
|
||||||
select_list.ProcessMouse(mouse.x, mouse.y);
|
select_list.ProcessMouse(mouse.x, mouse.y);
|
||||||
SelectList_Draw();
|
SelectList_Draw();
|
||||||
menu.show(Form.left+mouse.x, Form.top+mouse.y+skin_height, 136, "Open file Enter\nDelete Del", 10);
|
menu.show(Form.left+mouse.x, Form.top+mouse.y+skin_height, 185, "Open file Enter\nDelete Del", 10);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ void main()
|
|||||||
{
|
{
|
||||||
PageLinks.Hover(mouse.x, WB1.list.first*WB1.list.item_h + mouse.y, link_color_inactive, link_color_active, bg_color);
|
PageLinks.Hover(mouse.x, WB1.list.first*WB1.list.item_h + mouse.y, link_color_inactive, link_color_active, bg_color);
|
||||||
if (bufsize) && (mouse.pkm) && (mouse.up) {
|
if (bufsize) && (mouse.pkm) && (mouse.up) {
|
||||||
menu.show(Form.left+mouse.x-6,Form.top+mouse.y+skin_height+3, 180, #rmb_menu, VIEW_SOURCE);
|
EventShowMenu(mouse.x, mouse.y);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (WB1.list.MouseScroll(mouse.vert)) WB1.DrawPage();
|
if (WB1.list.MouseScroll(mouse.vert)) WB1.DrawPage();
|
||||||
@ -342,9 +342,7 @@ void ProcessEvent(dword id__)
|
|||||||
else OpenPage();
|
else OpenPage();
|
||||||
return;
|
return;
|
||||||
case SANDWICH_BUTTON:
|
case SANDWICH_BUTTON:
|
||||||
mouse.y = TOOLBAR_H-6;
|
EventShowMenu(Form.cwidth - 215, TOOLBAR_H-6);
|
||||||
mouse.x = Form.cwidth - 167;
|
|
||||||
menu.show(Form.left+mouse.x-6,Form.top+mouse.y+skin_height+3, 180, #rmb_menu, VIEW_SOURCE);
|
|
||||||
return;
|
return;
|
||||||
case VIEW_SOURCE:
|
case VIEW_SOURCE:
|
||||||
WB1.list.first = 0;
|
WB1.list.first = 0;
|
||||||
@ -576,4 +574,9 @@ void ClickLink()
|
|||||||
OpenPage();
|
OpenPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EventShowMenu(dword _left, _top)
|
||||||
|
{
|
||||||
|
menu.show(Form.left+_left-6,Form.top+_top+skin_height+3, 220, #rmb_menu, VIEW_SOURCE);
|
||||||
|
}
|
||||||
|
|
||||||
stop:
|
stop:
|
@ -542,6 +542,7 @@ void draw_window()
|
|||||||
llist_copy(#files_active, #files);
|
llist_copy(#files_active, #files);
|
||||||
strcpy(#active_path, #path);
|
strcpy(#active_path, #path);
|
||||||
DrawStatusBar();
|
DrawStatusBar();
|
||||||
|
Open_Dir(#path,ONLY_OPEN);
|
||||||
DrawFilePanels();
|
DrawFilePanels();
|
||||||
if (del_active) Del_Form();
|
if (del_active) Del_Form();
|
||||||
if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
|
if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
|
||||||
|
@ -28,6 +28,7 @@ void DrawBreadCrumbs()
|
|||||||
breadCrumb.add(i+1);
|
breadCrumb.add(i+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
breadCrumb.add(i+1);
|
||||||
btn.set_size(246,10,NULL,20);
|
btn.set_size(246,10,NULL,20);
|
||||||
area_w = Form.cwidth - btn.x - 20;
|
area_w = Form.cwidth - btn.x - 20;
|
||||||
for (i=0; i<breadCrumb.count-1; i++)
|
for (i=0; i<breadCrumb.count-1; i++)
|
||||||
@ -50,7 +51,7 @@ void ClickOnBreadCrumb(unsigned clickid)
|
|||||||
for (i=0; i!=clickid+2; i++) {
|
for (i=0; i!=clickid+2; i++) {
|
||||||
slashpos=strchr(slashpos,'/')+1;
|
slashpos=strchr(slashpos,'/')+1;
|
||||||
}
|
}
|
||||||
ESBYTE[slashpos] = NULL;
|
ESBYTE[slashpos-1] = NULL;
|
||||||
Open_Dir(#path,WITH_REDRAW);
|
Open_Dir(#path,WITH_REDRAW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,11 +43,11 @@ void main()
|
|||||||
if (id==1) ExitProcess();
|
if (id==1) ExitProcess();
|
||||||
if (id==butv.id) {
|
if (id==butv.id) {
|
||||||
menu.selected = category+1;
|
menu.selected = category+1;
|
||||||
menu.show(Form.left+5 + butv.x, Form.top+skin_height + butv.y + butv.h, 100, #vegetables, butv.id);
|
menu.show(Form.left+5 + butv.x, Form.top+skin_height + butv.y + butv.h, 140, #vegetables, butv.id);
|
||||||
}
|
}
|
||||||
if (id==buta.id) {
|
if (id==buta.id) {
|
||||||
menu.selected = 0;
|
menu.selected = 0;
|
||||||
menu.show(Form.left+5 + buta.x, Form.top+skin_height + buta.y + buta.h, 120, #animals, buta.id);
|
menu.show(Form.left+5 + buta.x, Form.top+skin_height + buta.y + buta.h, 140, #animals, buta.id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ void _menu::show(dword _appear_x, _appear_y, _menu_width, _text, _identifier)
|
|||||||
list.cur_y = -1;
|
list.cur_y = -1;
|
||||||
list.ClearList();
|
list.ClearList();
|
||||||
list.count = chrnum(text, '\n')+1;
|
list.count = chrnum(text, '\n')+1;
|
||||||
list.SetSizes(2,2,_menu_width,list.count*19,19);
|
list.SetSizes(2,2,_menu_width,list.count*24,24);
|
||||||
|
|
||||||
CreateThread(#_menu_thread,#stak+4092);
|
CreateThread(#_menu_thread,#stak+4092);
|
||||||
}
|
}
|
||||||
@ -57,8 +57,8 @@ void _menu_draw_list()
|
|||||||
if (N==menu.list.cur_y) bgcol=0xFFFfff; else bgcol=0xE4DFE1;
|
if (N==menu.list.cur_y) bgcol=0xFFFfff; else bgcol=0xE4DFE1;
|
||||||
DrawBar(menu.list.x, N*menu.list.item_h+menu.list.y, menu.list.w-3, menu.list.item_h, bgcol);
|
DrawBar(menu.list.x, N*menu.list.item_h+menu.list.y, menu.list.w-3, menu.list.item_h, bgcol);
|
||||||
}
|
}
|
||||||
WriteTextLines(13, menu.list.item_h-8/2+menu.list.y, 0x80, 0, menu.text, menu.list.item_h);
|
WriteTextLines(13, menu.list.item_h-12/2+menu.list.y, 0x90, 0, menu.text, menu.list.item_h);
|
||||||
if (menu.selected) WriteText(5, menu.selected-1*menu.list.item_h+7, 0x80, 0xEE0000, "\x10");
|
if (menu.selected) WriteText(5, menu.selected-1*menu.list.item_h+11, 0x80, 0xEE0000, "\x10");
|
||||||
}
|
}
|
||||||
|
|
||||||
void _menu_item_click()
|
void _menu_item_click()
|
||||||
|
Loading…
Reference in New Issue
Block a user