mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-03 08:51:22 +00:00
Added right and middle button support for _SCREENCLICK with Windows
This commit is contained in:
parent
b89ade1c5c
commit
d3a2424b73
|
@ -26079,7 +26079,7 @@ return qbs_new(0,1);
|
|||
}
|
||||
#endif //DEPENDENCY_SCREENIMAGE
|
||||
|
||||
void sub__screenclick(int32 x,int32 y){
|
||||
void sub__screenclick(int32 x,int32 y, int32 button, int32 passed){
|
||||
|
||||
if (cloud_app){error(262); return;}
|
||||
|
||||
|
@ -26106,11 +26106,36 @@ return qbs_new(0,1);
|
|||
ZeroMemory(&input,sizeof(INPUT));
|
||||
input.type=INPUT_MOUSE;
|
||||
input.mi.dwFlags=MOUSEEVENTF_LEFTDOWN;
|
||||
if (passed){
|
||||
|
||||
}
|
||||
SendInput(1,&input,sizeof(INPUT));
|
||||
|
||||
ZeroMemory(&input,sizeof(INPUT));
|
||||
input.type=INPUT_MOUSE;
|
||||
input.mi.dwFlags=MOUSEEVENTF_LEFTUP;
|
||||
|
||||
if (passed){
|
||||
if (button==1) {input.mi.dwFlags=MOUSEEVENTF_LEFTDOWN;}
|
||||
if (button==2) {input.mi.dwFlags=MOUSEEVENTF_RIGHTDOWN;}
|
||||
if (button==3) {input.mi.dwFlags=MOUSEEVENTF_MIDDLEDOWN;}
|
||||
SendInput(1,&input,sizeof(INPUT));
|
||||
|
||||
ZeroMemory(&input,sizeof(INPUT));
|
||||
input.type=INPUT_MOUSE;
|
||||
|
||||
if (button==1) {input.mi.dwFlags=MOUSEEVENTF_LEFTUP;}
|
||||
if (button==2) {input.mi.dwFlags=MOUSEEVENTF_RIGHTUP;}
|
||||
if (button==3) {input.mi.dwFlags=MOUSEEVENTF_MIDDLEUP;}
|
||||
}else {
|
||||
input.mi.dwFlags=MOUSEEVENTF_LEFTDOWN;
|
||||
|
||||
SendInput(1,&input,sizeof(INPUT));
|
||||
|
||||
ZeroMemory(&input,sizeof(INPUT));
|
||||
input.type=INPUT_MOUSE;
|
||||
|
||||
input.mi.dwFlags=MOUSEEVENTF_LEFTUP;
|
||||
}
|
||||
SendInput(1,&input,sizeof(INPUT));
|
||||
|
||||
#endif
|
||||
|
|
|
@ -239,7 +239,7 @@ extern void sub__printimage(int32 i);
|
|||
extern float func__mousemovementx(int32 context, int32 passed);
|
||||
extern float func__mousemovementy(int32 context, int32 passed);
|
||||
extern void sub__screenprint(qbs *txt);
|
||||
extern void sub__screenclick(int32 x,int32 y);
|
||||
extern void sub__screenclick(int32 x,int32 y, int32 button, int32 passed);
|
||||
extern int32 func__screenimage(int32 x1,int32 y1,int32 x2,int32 y2,int32 passed);
|
||||
extern void sub_lock(int32 i,int64 start,int64 end,int32 passed);
|
||||
extern void sub_unlock(int32 i,int64 start,int64 end,int32 passed);
|
||||
|
|
|
@ -4,4 +4,4 @@ DIM SHARED AutoBuildMsg AS STRING
|
|||
Version$ = "1.1"
|
||||
'BuildNum format is YYYYMMDD/id, where id is a ever-increasing
|
||||
'integer. If you make a change, update the date and increase the id!
|
||||
BuildNum$ = "20170922/67"
|
||||
BuildNum$ = "20170924/68"
|
||||
|
|
|
@ -578,8 +578,9 @@ clearid
|
|||
id.n = "_SCREENCLICK"
|
||||
id.subfunc = 2
|
||||
id.callname = "sub__screenclick"
|
||||
id.args = 2
|
||||
id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
|
||||
id.args = 3
|
||||
id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
|
||||
id.specialformat = "?,?[,?]"
|
||||
id.NoCloud = 1
|
||||
regid
|
||||
|
||||
|
|
Loading…
Reference in a new issue