forked from KolibriOS/kolibrios
Eolite 2.72: control mouse gestures; small fix.
git-svn-id: svn://kolibrios.org@5549 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
85f85fa6d0
commit
c0563e70a8
@ -95,8 +95,8 @@
|
|||||||
|
|
||||||
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
||||||
|
|
||||||
#define TITLE "Eolite File Manager v2.7"
|
#define TITLE "Eolite File Manager v2.72"
|
||||||
#define ABOUT_TITLE "Eolite v2.7"
|
#define ABOUT_TITLE "Eolite v2.72"
|
||||||
dword col_padding, col_selec, col_lpanel;
|
dword col_padding, col_selec, col_lpanel;
|
||||||
|
|
||||||
int toolbar_buttons_x[7]={9,46,85,134,167,203};
|
int toolbar_buttons_x[7]={9,46,85,134,167,203};
|
||||||
@ -140,6 +140,10 @@ int action_buf;
|
|||||||
int rand_n;
|
int rand_n;
|
||||||
int selected_count;
|
int selected_count;
|
||||||
|
|
||||||
|
mouse gestures;
|
||||||
|
signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
|
||||||
|
byte stats;
|
||||||
|
|
||||||
edit_box edit2 = {250,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xffffff,0,248,#file_name,#mouse_dd,64,6,6};
|
edit_box edit2 = {250,213,80,0xFFFFCC,0x94AECE,0xFFFFCC,0xffffff,0,248,#file_name,#mouse_dd,64,6,6};
|
||||||
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
|
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
|
||||||
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
|
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
|
||||||
@ -160,7 +164,7 @@ void main()
|
|||||||
word key, id, can_show, can_select, m_selected;
|
word key, id, can_show, can_select, m_selected;
|
||||||
dword selected_offset;
|
dword selected_offset;
|
||||||
rand_n = random(40);
|
rand_n = random(40);
|
||||||
|
gestures.get();
|
||||||
mem_Init();
|
mem_Init();
|
||||||
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(ERROR_1);
|
if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(ERROR_1);
|
||||||
if (load_dll2(libini, #lib_init,1)!=0) notify("Error: library doesn't exists - libini");
|
if (load_dll2(libini, #lib_init,1)!=0) notify("Error: library doesn't exists - libini");
|
||||||
@ -187,6 +191,52 @@ void main()
|
|||||||
|
|
||||||
m.get();
|
m.get();
|
||||||
|
|
||||||
|
|
||||||
|
gestures.get();
|
||||||
|
if (gestures.mkm) && (stats==0)
|
||||||
|
{
|
||||||
|
x_old = gestures.x;
|
||||||
|
y_old = gestures.y;
|
||||||
|
stats = 1;
|
||||||
|
}
|
||||||
|
if (gestures.mkm) && (stats==1)
|
||||||
|
{
|
||||||
|
dif_x = gestures.x-x_old;
|
||||||
|
dif_y = gestures.y-y_old;
|
||||||
|
|
||||||
|
if (dif_x<0) adif_x = -dif_x;
|
||||||
|
else adif_x = dif_x;
|
||||||
|
if (dif_y<0) adif_y = -dif_y;
|
||||||
|
else adif_y = dif_y;
|
||||||
|
|
||||||
|
if (adif_x>adif_y)
|
||||||
|
{
|
||||||
|
if (dif_x > 150)
|
||||||
|
{
|
||||||
|
if (HistoryPath(GO_FORWARD))
|
||||||
|
{
|
||||||
|
files.first=files.current=NULL; //aaa?o nienea
|
||||||
|
Open_Dir(#path,WITH_REDRAW);
|
||||||
|
}
|
||||||
|
stats = 0;
|
||||||
|
}
|
||||||
|
if (dif_x < -150)
|
||||||
|
{
|
||||||
|
GoBack();
|
||||||
|
stats = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (dif_y < -150)
|
||||||
|
{
|
||||||
|
Dir_Up();
|
||||||
|
stats = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (files.MouseOver(m.x, m.y)) && (!can_select)
|
if (files.MouseOver(m.x, m.y)) && (!can_select)
|
||||||
{
|
{
|
||||||
m_selected = m.y - files.y / files.line_h;
|
m_selected = m.y - files.y / files.line_h;
|
||||||
|
@ -48,7 +48,7 @@ void about_dialog()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case evReDraw:
|
case evReDraw:
|
||||||
DefineAndDrawWindow(600,150,181,228+GetSkinHeight(),0x34,sc.work,INTRO_TEXT_1);
|
DefineAndDrawWindow(Form.left + 200,150,181,228+GetSkinHeight(),0x34,sc.work,INTRO_TEXT_1);
|
||||||
GetProcessInfo(#about_form, SelfInfo);
|
GetProcessInfo(#about_form, SelfInfo);
|
||||||
if (Form.status_window>2) break;
|
if (Form.status_window>2) break;
|
||||||
DrawBar(0,0,about_form.cwidth,50,0x8494C4);
|
DrawBar(0,0,about_form.cwidth,50,0x8494C4);
|
||||||
|
@ -59,7 +59,7 @@ char program_path[4096];
|
|||||||
|
|
||||||
:struct mouse
|
:struct mouse
|
||||||
{
|
{
|
||||||
signed x,y,lkm,pkm,hor,vert;
|
signed x,y,lkm,mkm,pkm,hor,vert;
|
||||||
void get();
|
void get();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -79,11 +79,15 @@ char program_path[4096];
|
|||||||
EBX = 2;
|
EBX = 2;
|
||||||
$int 0x40
|
$int 0x40
|
||||||
$mov ebx, eax
|
$mov ebx, eax
|
||||||
|
$mov ecx, eax
|
||||||
$and eax, 0x00000001
|
$and eax, 0x00000001
|
||||||
$shr ebx, 1
|
$shr ebx, 1
|
||||||
$and ebx, 0x00000001
|
$and ebx, 0x00000001
|
||||||
|
$shr ecx, 2
|
||||||
|
$and ecx, 0x00000001
|
||||||
lkm = EAX;
|
lkm = EAX;
|
||||||
pkm = EBX;
|
pkm = EBX;
|
||||||
|
mkm = ECX;
|
||||||
EAX = 37; //áªà®««
|
EAX = 37; //áªà®««
|
||||||
EBX = 7;
|
EBX = 7;
|
||||||
$int 0x40
|
$int 0x40
|
||||||
|
Loading…
Reference in New Issue
Block a user