09-02-2020, 08:03 AM
To create a mouse contingent screen resource in Experiment, select the screen resource and check the "Mouse Contingent" property.
Any screen resource can be used as a mouse contingent resource. Ticking the "Mouse Contingent" property will lock the screen resource to the mouse position, so it will move as if it was the mouse cursor. We have provided two common transparent background mouse cursors (one black, one white) within the Documents > Experiment Builder Examples > Resources >Images folder. These cursor images are PNG files with an alpha channel, so untick the 'Use Color Key' property for the cursor image resource so that the cursor has a transparent background.
The default position of the mouse cursor is the centre of the image, when the Screen Location Type is Centre. The Offset property can be used to align the interaction point with the tip of the cursor. If the Screen Location Type is set to "Center" then the image center of the cursor will be the point of interaction. To move this to the tip of the cursor offset the image's position by half the image's height and weight.
If you would like to reset the mouse cursor to a default position at the beginning of each trial, you can update this property with an update attribute. In the example, the mouse position is reset to the middle of a 1024*768 pixel screen.
Additionally, participants can interact via the mouse by using the Mouse Trigger to detect button presses and/or releases of the mouse. The Mouse Trigger has a variety of features that allow detecting mouse clicks either within or outside the boundaries of a specified region.
See also "How can I make it so that the participant can click on certain parts of the screen?" for more details.
Any screen resource can be used as a mouse contingent resource. Ticking the "Mouse Contingent" property will lock the screen resource to the mouse position, so it will move as if it was the mouse cursor. We have provided two common transparent background mouse cursors (one black, one white) within the Documents > Experiment Builder Examples > Resources >Images folder. These cursor images are PNG files with an alpha channel, so untick the 'Use Color Key' property for the cursor image resource so that the cursor has a transparent background.
The default position of the mouse cursor is the centre of the image, when the Screen Location Type is Centre. The Offset property can be used to align the interaction point with the tip of the cursor. If the Screen Location Type is set to "Center" then the image center of the cursor will be the point of interaction. To move this to the tip of the cursor offset the image's position by half the image's height and weight.
If you would like to reset the mouse cursor to a default position at the beginning of each trial, you can update this property with an update attribute. In the example, the mouse position is reset to the middle of a 1024*768 pixel screen.
Additionally, participants can interact via the mouse by using the Mouse Trigger to detect button presses and/or releases of the mouse. The Mouse Trigger has a variety of features that allow detecting mouse clicks either within or outside the boundaries of a specified region.
See also "How can I make it so that the participant can click on certain parts of the screen?" for more details.