Welcome! Log In Create A New Profile

Advanced

Display and hide the mouse cursor

Posted by Alex 
Display and hide the mouse cursor
May 11, 2020 06:42AM
Hi Jaewon,

Do you have any functions that allow us to display/hide the mouse cursor during the run_scene running?
Currently a virtual mouse cursor is always displaying on the subject screen.

Thanks!
Re: Display and hide the mouse cursor
May 12, 2020 01:53PM
On what condition is this happening? Are you using MouseTracker but do not want to show a cursor? Have you tried the latest package?
Re: Display and hide the mouse cursor
January 01, 2021 08:37AM
Hi Jaewon,

I have a task that needs human subjects to indicate a target position by mouse click.

How can we control the display/hide the mouse cursor during a certain period of the task?


Thanks!
Re: Display and hide the mouse cursor
January 03, 2021 07:26PM
The mouse cursor just shows up when you run a scene that contains the mouse tracker. There is no need to turn it on and off.
Re: Display and hide the mouse cursor
January 04, 2021 08:02AM
Thanks Jaewon,

Unfortunately we are using your V1 specific functions, which are not compatible with the run_scene.

We can read the mouse position by mouse_position, but cannot control the on/off of the mouse cursor, that 's the problem.



Also, I tried to use run_scene separately.

The mouse cursor just shows up, as you said, but it keeps on showing all the time but not only one chosen period.
(e.g. I may only need the mouse cursor shows up during the choice period in your demo dms timing script, no fixation, or sample, or delay period)

I wonder the on/off of mouse cursor was actually just controlled by the 'Other device settings' on the control panel?
Re: Display and hide the mouse cursor
January 04, 2021 07:12PM
Since Timing Script v1 does not process mouse input, you need to draw the cursor yourself. Register a cursor image as a PIC TaskObject. When you read the mouse position, call reposition_object() as well to change the position of the cursor image. Use toggleobject() to turn on and off the cursor.

The behavior of the mouse cursor during the run_scene() is my mistake. I am working on it.

----------

Update: The MouseTracker is fixed.
Re: Display and hide the mouse cursor
January 06, 2021 02:32AM
I worked it out.

Thank you Jaewon!

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.