diff --git a/programs/fs/Eolite/trunk/Eolite.c-- b/programs/fs/Eolite/trunk/Eolite.c-- index d2cc0c55f4..641aec981a 100644 --- a/programs/fs/Eolite/trunk/Eolite.c-- +++ b/programs/fs/Eolite/trunk/Eolite.c-- @@ -20,19 +20,19 @@ int BUTTON_HEIGHT=18; #define ONLY_OPEN 2 //переменные -#define title "Eolite File Manager v1.4" +#define title "Eolite File Manager v1.41" dword selection_col = 0x94AECE; dword lpanel_col = 0x00699C; /* -int f_visible, +int f_count, f_first, f_current; */ -int but_num, +int f_visible, count, za_kadrom, curbtn; @@ -42,15 +42,16 @@ byte cut_active, rename_active, del_active; byte show_actions=1, - show_dev_name=1, + show_dev_name=1, sort_num=2, isdir; -char path[4096], - edit_path[4096], - file_path[4096], - file_name[4096], - copy_file[4096], - temp[4096]; +unsigned char + path[4096], + edit_path[4096], + file_path[4096], + file_name[4096], + copy_file[4096], + temp[4096]; int scroll_size; @@ -79,7 +80,7 @@ dword buf, off; // #include "include\sorting.h" #include "include\icons_f.h" #include "include\ini.h" -#include "include\devices.h" +#include "include\left_panel.h" #include "include\history.h" void main() @@ -132,7 +133,7 @@ void main() if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>onTop(22,0)+1) && (m.y0) { if (za_kadrom>0) za_kadrom--; - if (curbtn0) za_kadrom--; - if (curbtn0) curbtn--; List_ReDraw(); - if (za_kadrom0) curbtn--; List_ReDraw(); } @@ -172,7 +173,7 @@ void main() j= scroll_size/2; za_kadrom = m.y -j -57 * count; za_kadrom /= onTop(22,57); - IF (but_num+za_kadrom>count) za_kadrom=count-but_num; + IF (f_visible+za_kadrom>count) za_kadrom=count-f_visible; IF (id<>za_kadrom) List_ReDraw(); //чтоб лишний раз не перерисовывать } break; @@ -360,15 +361,15 @@ void main() List_ReDraw(); break; case 181: //end - za_kadrom=count-but_num; - curbtn=but_num-1; + za_kadrom=count-f_visible; + curbtn=f_visible-1; List_ReDraw(); break; case 183: //Page Down - FileList_ReDraw(but_num-1); + FileList_ReDraw(f_visible-1); break; case 184: //Page Up - FileList_ReDraw(-but_num+1); + FileList_ReDraw(-f_visible+1); break; case 051: //Нажата F2 REN_MARK: @@ -486,8 +487,8 @@ void FileList_ReDraw(int curbtn_) } else //вниз { - IF (za_kadrom==count-but_num) && (curbtn==but_num-1) return; - IF (but_num-curbtn>curbtn_) + IF (za_kadrom==count-f_visible) && (curbtn==f_visible-1) return; + IF (f_visible-curbtn>curbtn_) { Line_ReDraw(0xFFFFFF, curbtn); //белая полоса curbtn+=curbtn_; @@ -498,18 +499,18 @@ void FileList_ReDraw(int curbtn_) { IF(za_kadrom+curbtn+curbtn_>=count) { - za_kadrom=count-but_num; + za_kadrom=count-f_visible; curbtn=curbtn_-za_kadrom+curbtn; } ELSE { - za_kadrom+=curbtn_+curbtn-but_num+1; - curbtn=but_num-1; + za_kadrom+=curbtn_+curbtn-f_visible+1; + curbtn=f_visible-1; } - IF (curbtn<0) || (curbtn>but_num) + IF (curbtn<0) || (curbtn>f_visible) { - curbtn=but_num-1; + curbtn=f_visible-1; } List_ReDraw(); } @@ -521,11 +522,11 @@ void FileList_ReDraw(int curbtn_) void List_ReDraw() { - int paint_x=but_num*BUTTON_HEIGHT+57; - IF (count-za_kadrombut_num-1) //если мы в конце списка файлов развернём окно появяться пустяе белые кнопки - { za_kadrom=count-but_num; curbtn=but_num-1; } //это если выделение после схлопывания окна за кадром + int paint_x=f_visible*BUTTON_HEIGHT+57; + IF (count-za_kadromf_visible-1) //если мы в конце списка файлов развернём окно появяться пустяе белые кнопки + { za_kadrom=count-f_visible; curbtn=f_visible-1; } //это если выделение после схлопывания окна за кадром - FOR (j=0; jj) Line_ReDraw(0xFFFFFF, j); ELSE Line_ReDraw(selection_col, curbtn); + FOR (j=0; jj) Line_ReDraw(0xFFFFFF, j); ELSE Line_ReDraw(selection_col, curbtn); DrawBar(192,paint_x,onLeft(27,192),onTop(paint_x,6),0xFFFFFF); //заливка белым доконца DrawBar(onLeft(168,0),paint_x,1,onTop(paint_x,6),0xE4DFE1); //полоса серая вертикальная 1 DrawBar(onLeft(95,0),paint_x,1,onTop(paint_x,6),0xE4DFE1); //полоса серая вертикальная 2 @@ -612,9 +613,9 @@ void Open_Dir(dword temp_, redraw){ KEdit(); HistoryPath(ADD_NEW_PATH); IF (!strcmp(".",buf+72)) {count--; memmov(buf,buf+304,count*304);} //фильтруем элемент "." - FOR (j=0;jONLY_SHOW) Sorting(); //для больших папок при репеинте окна IF (redraw<>ONLY_OPEN) List_ReDraw(); } - IF (count==-1) && (redraw<>ONLY_OPEN) {but_num=count=0; List_ReDraw();} + IF (count==-1) && (redraw<>ONLY_OPEN) {f_visible=count=0; List_ReDraw();} } diff --git a/programs/fs/Eolite/trunk/include/about_dialog.h b/programs/fs/Eolite/trunk/include/about_dialog.h index 101186c4f5..f9736ac1c5 100644 --- a/programs/fs/Eolite/trunk/include/about_dialog.h +++ b/programs/fs/Eolite/trunk/include/about_dialog.h @@ -38,7 +38,7 @@ void about_dialog() DefineAndDrawWindow(600,150,181,256,0x34,0x10EFEBEF,"About Eolite"); DrawBar(0,0,172,50,0x8494C4); //голубое сзади PutPaletteImage(#logo,85,85,43,7,#logo_pal); - WriteText(49,100,0x90,0xBF40BF,"Eolite v1.4",0); + WriteText(46,100,0x90,0xBF40BF,"Eolite v1.41",0); $add ebx, 1<<16 $int 0x40 WriteText(55,120,0x80,0,"Developers:",0); diff --git a/programs/fs/Eolite/trunk/include/devices.h b/programs/fs/Eolite/trunk/include/left_panel.h similarity index 93% rename from programs/fs/Eolite/trunk/include/devices.h rename to programs/fs/Eolite/trunk/include/left_panel.h index a5c1be945e..b938ed0bb4 100644 --- a/programs/fs/Eolite/trunk/include/devices.h +++ b/programs/fs/Eolite/trunk/include/left_panel.h @@ -51,7 +51,7 @@ void DrawSystemDiscs() char disc_name[100]; int i, dev_icon; - for (i=0; i<20; i++) DeleteButton(i); + for (i=0; i<20; i++) DeleteButton(100+i); //список дисков Tip(56, "Devices", 78, "="); for (i=0;i300) PutPaletteImage(#blue_hl, 190, 87, 2, start_y+100, #blue_hl_pal); } } diff --git a/programs/fs/Eolite/trunk/include/some_code.h b/programs/fs/Eolite/trunk/include/some_code.h index 6126ceddc4..ab864616ff 100644 --- a/programs/fs/Eolite/trunk/include/some_code.h +++ b/programs/fs/Eolite/trunk/include/some_code.h @@ -29,9 +29,9 @@ inline fastcall void TVScroll() { // dword on_y; if (count<=0) {DrawFlatButton(onLeft(27,0),57,16,onTop(22,58),0,0xE4DFE1,""); return;} on_y = za_kadrom * onTop(22,57) / count +57; - scroll_size=onTop(22,57) * but_num - but_num / count; + scroll_size=onTop(22,57) * f_visible - f_visible / count; if (scroll_size<20) scroll_size = 20; //устанавливаем минимальный размер скролла - if (scroll_size>onTop(22,57)-on_y+56) || (za_kadrom+but_num>=count) on_y=onTop(23+scroll_size,0); //для большого списка + if (scroll_size>onTop(22,57)-on_y+56) || (za_kadrom+f_visible>=count) on_y=onTop(23+scroll_size,0); //для большого списка DrawFlatButton(onLeft(27,0),on_y,16,scroll_size,0,0xE4DFE1,"");//ползунок DrawBar(onLeft(26,0),57,15,on_y-57,0xCED0D0);//поле до ползунка DrawBar(onLeft(26,0),on_y+scroll_size+1,15,onTop(22,57)-scroll_size-on_y+56,0xCED0D0); //поле после ползунка