mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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
  }
}




#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
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

Last edited by FroggieDaFrog; 20/10/12 06:16 PM.

I am SReject
My Stuff
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard