No offense, but you have gracefully stepped over the main two reasons I make this suggestion:
1: The current way of doing mouse events is inconsistent with the rest of how mIRC handles events. An event happens in a dialog onDialog is triggered, someone says something in a channel onText is triggered. To me it would only make sense that if the a mouse event occurs, onMouse would be called.
2: Using the current method, checking if a specific mouse event occurred for a specified area is quite cumbersome. Checking if $mouse.key equals a specific value, check if $mouse.x/y are with a specific range, keeping track of where the mouse is and whether or not the mouse moved into, moved while inside, or moved to the outside of the area. My suggested method handles all of this and more with ease
I understand that all but the suggested mousewheel event(which can be done with a dll) can be scripted, but doing so is quite unwieldy compared to what I have purposed.
Purpose you have a @picwin inwhich you want to script a button for that changes color when hovered over, clicked over, or revert back.
The current way:
menu @Win {
move:{
if (mouse isin buttonA) {
if (mouse button ispressed) {
if (mouse wasn't in buttonA) || (mousebutton wasn't pressed) {
draw ButtonA pressed
}
}
elseif (mouse wasn't in buttonA) || (mousebutton was pressed) {
draw ButtonA hovered
}
}
elseif (mouse wasin ButtonA) {
draw ButtonA as normal
}
}
sclick:{
if (mouse isin ButtonA) {
draw ButtonA pressed
}
}
uclick:{
if (mouse isin ButtonA) {
draw ButtonA Hover
}
}
}
The purposed way:
on *:MOUSE:@Win:Enter,SClick,UClick:X-X2:Y-Y2:{
if (mouse button is pressed) {
draw ButtonA pressed
}
else {
draw ButtonA hovered
}
}
on *:MOUSE:@Win:Leave:X-X2:Y-Y2:{
draw ButtonA Normal
}