mIRC Homepage
Posted By: Wims hand cursor in picture window - 15/10/12 03:51 AM
I was thinking having the ability to show the hand cursor in picture window would be great:

Code:
alias testwin {
  window -pdoCBf @testwin -1 -1 200 200
  drawtext -r @testwin 0 verdana 15 60 90 www.mirc.com
}
menu @testwin {
mouse:{
 if ($inrect($mouse.x,$mouse.y,60,90,114,19)) {
   drawtext -r @testwin 16515072 verdana 15 60 90 www.mirc.com
   ;hand cursor here
  }
 else drawtext -r @testwin 0 verdana 15 60 90 www.mirc.com
  }
}


Posted By: FroggieDaFrog Re: hand cursor in picture window - 20/10/12 06:16 PM
I think a far more useful suggestion would be a way to toggle the cursor's visibility for a picwin. It would allow for coders to create custom cursors.

/cursor -vh @picwin
-v: displays the mouse cursor within the specified picwin
-h: hides the mouse cursor within the specified picwin

$cursor(@picwin)
returns $true if the cursor is currently displayed, $false if not
Posted By: Wims Re: hand cursor in picture window - 20/10/12 06:51 PM
Hiding/showing the cursor has nothing to do with my suggestion though. What you are suggesting is not a far more useful suggestion, just a different one that you should have posted in its own thread.
Posted By: argv0 Re: hand cursor in picture window - 20/10/12 09:08 PM
Actually, what FroggieDaFrog is implying does meet your goal, though I would argue is *less* useful to a user.

What he is implying is that you would hide the mouse cursor and then you can draw any custom cursor yourself using /drawpic

This is of course not ideal, since you would have to redraw the window every frame, which we all know mIRC is bad at handling.

The better generalized approach would be to allow mIRC to select *any* cursor icon from a dll/exe/ico the same way you can pick window icons, and have one of those indexes reserved for "no" cursor, which meets everyone's needs.
Posted By: Wims Re: hand cursor in picture window - 20/10/12 11:02 PM
Yeah lol, drawing my own cursor isn't really an option.
I don't mind having a general feature to handle the cursor globally but this would require me/users to know which dll/exe to call to get the correct (hand) cursor, here I'm only asking for a support of the hand cursor and wouldn't have to deal with the file&index.
Posted By: Riamus2 Re: hand cursor in picture window - 21/10/12 12:01 AM
It really wouldn't be too difficult or confusing for an option to be added to do what argv0 suggested, but to also have an optional 0-3 or however many are needed for commonly used cursors.

Basically, if you want no cursor, you use 0. If you want a normal cursor, you use 1 (or nothing). If you want a hand cursor, you use 2. If you want an hour glass (xp and older)/ring (vista and newer), you use 3. And so on. And then if you want a custom cursor, you replace the number with the dll/exe and index. If mIRC sees anything other than a number, it assumes you're using a dll/exe with index.

Just an idea anyhow. It would need to be laid out in a way that makes sense and is easy to use, but I think that sort of method would work well.
© mIRC Discussion Forums