Some additional information:
There are three messages you can use in such a case that are sent every 200 ms.

. Idle does not expects that the cursor is within any control rect and will be sent to the current card continuously: avoid to use it for this reason :-) . MouseWithin (like mouseStillDown) will be only sent to a control when the mouse hovers it even if the cursor is not moved: less intrusive yet :-) . MouseMove will be only sent to a control when the mouse is moved within the control rect: this one is the less overloading CPU use: as soon as you can use it, prefer it :-)

But in your case, MouseWithin seems to be the more appropriate because the cursor will change even if the mouse is not moved.

Le 14 janv. 08 à 13:15, Sakari Ruoho a écrit :

Wow! Thank you! Never even noticed mouseWithin handler or ignored it.. Problem solved


On Jan 14, 2008, at 1:40 PM, Eric Chatonet wrote:

Hi Sakari,

Le 14 janv. 08 à 12:07, Sakari Ruoho a écrit :

Hello folks,

Was wondering how to change the mouse cursor behavior, when user presses either ctrl or shift key? Like in photoshop with select tool where u can add to selection by pressing shift and remove from selection by pressing ctrl? If anyone has implemented anything like this, any help would be appreaciated. Thank you!

Sakari Ruoho
Software Designer
[EMAIL PROTECTED]

To achieve this you can use a mouseWithin handler:

on mouseWithin
 if the shiftKey is dow then set the cursor to x
 else if the optionKey is down then set the cursor to y
 else set the cursor to z
 lock cursor
end mouseWithin
-------------------------------------
on mouseLeave
unlock cursor
end mouseLeave

By default mouseWithin will be sent every 200 ms but you can adjust this value by setting the idleRate (or idleTicks) property.

Best regards from Paris,
Eric Chatonet.

Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/
----------------------------------------------------------------


_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to