You can simulate zoom coords by watching z key and scrolls, which I did for my multiplayer script, you can look in there (it's a bit messy, so you may need to ask me). I will make this a separate script if you want. It is actually very simple.
EDIT: Here is a script that adjusts mouse by zoom window only, you can do whatever you want with it.
i did some tests and it seemed to me that mouse state is transferred to mouseclick listeners only when lmb or rmb is pressed :/ trying your script now...
edit: well, yeah, it works like it should. and i found the reason of this ^. i accidentaly put a wheel state updater in "if event == 1 or event == 3" block
Yea, mouse hooks are only called when something happens (clicks,holds,release, and wheel)
So if you wanted something with mouseover.. yea you can't do that.
EDIT: fixed a small bug in the key_hook, it was supposed to ignore releases before bracket changes size.
i think you should fix another one. tpt can ignore mouse clicks if listener functions return "false".
if(bc && bq){
if(!luacon_mouseevent(x, y, bc, LUACON_MPRESS, sdl_wheel)){
b = 0;
}
}
else if(bc && !bq){
if(!luacon_mouseevent(x, y, bc, LUACON_MDOWN, sdl_wheel)){
b = 0;
}
}
else if(!bc && bq){
if(!luacon_mouseevent(x, y, bq, LUACON_MUP, sdl_wheel)){
b = 0;
}
}
else if (sdl_wheel){
luacon_mouseevent(x, y, bq, 0, sdl_wheel);
}
but it can't ignore wheel-only events
Yea I know, All the mouse wheel checks are done before the lua hooks are ever called, so changing it there would do nothing.
I believe this is fixed in TPT++ though, which should be coming 'soon'. But it has other issues, zoom window is slightly different so this script doesn't work very well.