Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 9th, 2025, 9:32 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Follow mouse cursor (object centered)
PostPosted: July 17th, 2008, 7:00 pm 
Offline

Joined: February 17th, 2008, 11:42 pm
Posts: 11
Hi everybody,

I would like to know if its possible to keep the mouse cursor and the object (to follow the cursor) always centered when you use the "move object to cursor" action. When you move the mouse faster, the cursor doesnt stay exactly centered. I also tried the getmouse/setmouse positions but it doesnt stay exactly at the center of the bounding box of the image or vector. Also tried a ticker to update the mouse position with better results, but still not exactly at the center. It would be important to stay centered.

Thanks alot for the help


Top
 Profile  
 
 Post subject: Re: Follow mouse cursor (object centered)
PostPosted: July 18th, 2008, 12:01 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
BPM wrote:
I would like to know if its possible to keep the mouse cursor and the object (to follow the cursor) always centered when you use the "move object to cursor" action. When you move the mouse faster, the cursor doesnt stay exactly centered


Since you emphasize the word "Always" -- the short answer is no.
The long answer is -- it depends on a lot of things.
For example:

The size of the graphics involved.
Whether you are using vectors or bitmaps and how large they are.
If you are using vectors -- solid color (faster) or gradients (slower) or stroked (usually faster).
Type of background image behind the object following the cursor.
LCD response time; a slow screen will stop the image from tracking the mouse properly.
Processor/ Graphics speed.
What kind of application is it, and why does it need to track the mouse exactly?

It would help if your question was more specific, and you put your computer details and the version of Opus you use into your signature, as I do.

Paul


Last edited by Paul on July 18th, 2008, 2:32 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: July 18th, 2008, 1:42 am 
Offline

Joined: February 17th, 2008, 11:42 pm
Posts: 11
Quote:
Since you emphasize the word "Always" -- the short answer is no.
The long answer is -- it depends on a lot of things.
For example:

The size of the graphics involved.
Whether you are using vectors or bitmaps and how large they are.
If you are using vectors -- solid color (faster) or gradients (slower) or stroked (usually faster).
Type of background image behind the object following the cursor.
LCD response time; a slow screen will stop the image from tracking the mouse properly.
Processor/ Graphics speed.
What kind of application is it, and why does it need to track the mouse exactly?

It would help if your question was more specific, and you put your computer details and the version of Opus you use into your signature, as I do.


Thanks for the reply, paul. The follow mouse cursor works ok at slow/medium speed. The problem is when the mouse is moved at higher speed or with greater mouse dpi... the cursor is not at the center or over the object (vector or image), the user can´t click over the object (it would be better if the object stays on the center, but if the cursor stays always over the object should work too). The user should click on the object to have an action.

My goal on this app is to have an image that could follow the mouse cursor when the user clicks over it and drop this image in other place of the screen, similar to a puzzle mechanism. But I don´t want the drag n drop feature (holding the mouse left button).

The problem is when I have to drop the object. Because sometimes the cursor stays "outside" the bounding box (especially when resizing it to smaller size), so I can´t click on the image again to drop it over the desired area. This image can be resized/rotated by the user before dropping it, also this image can be grabbed again.


I am using Opus Pro 6.01, Windows Vista Home Premium, Penthium DualCore 1.60 GHz, 1gb of Ram.


Top
 Profile  
 
 Post subject:
PostPosted: July 18th, 2008, 4:27 am 
Many years ago I was working on a publication that allowed users to test their knowledge of grammar. One specific aspect of this was to test their ability to recognise the different parts of speech which I had set at 9.

This meant that there were 9 different coloured pencils with each colour related to a specific part of speech. The user needed to pick up a pencil, drag it to the target word and click the pencil. If the correct word was chosen, the word displayed a hotspot the same colour as the pencil.

This technique probably does not match exactly what you want to do, but you might be able to modify this to arrive at a solution that suits you.

In particular note that no matter where you click on the pencil, the cursor is centred over the pencil.

My thanks and acknowledgement for his assistance go to Steve Henson for helping me to turn my esoteric ideas into reality.

PLEASE NOTE We produced this technique many years ago. Because I'm now giving 70 a fright, my memory isn't what it once was, so there is no point in asking for help or for clarification about the comments that appear. They obviously had some meaning when I wrote them, but ... :oops:

I hope you might get something from this example. :D

You comment that you have issues when moving the cursor too fast. Is it possible that what you are asking requires more resources than your computer has? Could you perhaps test it on a more powerful computer just to possibly eliminate on issue?

Apologies: For some reason the attached IMP file did not make it to the forum. It is only a small file, so email me at sentosa at jeelan dot com dot au and I'll send you a copy.


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 57 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group