mouseAdjuster

 elements

An adjuster and response handler element that lets the subject adjust properties of other elements by clicking and dragging the mouse cursor on screen like a slider. Or you can use property move to adjust the position of another element by clicking and dragging the element. One mouse button adjusts and the other says "done adjusting". Note mouseAdjuster elements may not work with trackpad taps.

Response values generated are adjusted property value(s).

▸ Object ends on its own?

By default yes, when it records one "done adjusting" response. You can change number of responses to wait for in property maxNumResponses. If you set maxNumResponses = <cd>inf<cd>, records responses indefinitely until a condition you set in property end.

"Ends on its own" means ends automatically at that point. If an element can end on its own, you don't need to set end conditions for it in property end (unless you want it to maybe end earlier).

No—runs until any condition you set in property end.

Input properties

Adjustable properties

You can vary or allow the subject to adjust the following properties of an object of this type when it's running. If you need to make other properties adjustable, you can edit the element type code—see Element Type Programming Manual.

Adjustable properties

Adjustable properties

position
nn_eyes
rotation
colorMask
alpha
intensity
contrastMult
drawCodeVars

(None)

(None)

drag_x
drag_y
drag_xy

No defaults

Properties = <cd>true<cd>/<cd>false<cd> setting adjustment mode. Set ONE of these = <cd>true<cd>:

drag_x = <cd>true<cd>: Subject adjusts by dragging the mouse cursor horizontally. Adjustment value is a number per distance dragged—see deltaRate below.

drag_y = <cd>true<cd>: Same but vertically.

drag_xy = <cd>true<cd>: Subject adjusts by dragging the mouse cursor in both dimensions. Adjustment value is a 1×2 vector per distance dragged (so typically the target you set in adjust.target must be a 1×2 vector).

deltaRate

No default (ignored if move = <cd>true<cd> below)

A number that is adjustment to apply per distance dragged on screen. Magnitude is deltaRate × distance dragged. right/up = +, left/down = −. By default distance on screen is in deg, as usual.

e.g.
drag_x
= <cd>true<cd>
deltaRate = 0.5
→ +0.5/deg dragged right, −0.5/deg dragged left

If drag_xy = <cd>true<cd> then deltaRate can optionally be a 1×2 vector setting separate rates for [x y].

Use adjust to set where and how adjustments are applied.

deltaIncrement

Default: apply adjustments of any magnitude

By default drag applies adjustments of any magnitude down to whatever corresponds to 1 px dragged on screen. However, some element properties can only receive adjustments that are multiples of some increment. e.g. a property that must be an integer can only receive adjustments that are integer multiples of 1. If so, you can set increment here (a number > 0). The adjuster will then buffer (not round or clip) adjustments to apply them in integer multiples of the increment. If drag_xy = <cd>true<cd> then deltaIncrement can be a 1×2 vector corresponding to separate increments for [x y]. 0 = apply adjustments of any magnitude.

clickAreaSize

Default: click anywhere to drag

Size of the area on screen that the subject can click in to start a drag. This is a number that is side length for a square, or a vector [width height] for a rectangle (deg). Or the number <cd>inf<cd> = click anywhere. Click area is centered at element position, which you can set in property position (default relative to screen center).

move

Default: <cd>false<cd>

<cd>true<cd>/<cd>false<cd>: special mode to adjust target element position on screen by clicking & dragging the element. If = <cd>true<cd>:
  • adjust.target must point to property position (e.g. <cds>"<element>.position"<cds>, or <cds>"<element>.position{1}"<cds> if you use a distance unit other than deg).
  • drag_x/drag_y/drag_xy above apply as usual. drag_x and drag_y send adjustments that are numbers, so typically if using one of them, set target to the corresponding position dimension (e.g. drag_y = <cd>true<cd> → target = <cds>"<element>.position(2)"<cds>). drag_xy sends adjustments that are 1×2 vectors, so typically if using it, set target to the whole position, i.e. move in both dimensions.
  • deltaRate, deltaIncrement, clickAreaSize above are ignored.

n_dragButton

Default: button 1 drags; all other buttons input done adjusting

A number or vector that is mouse button number(s) to click to drag. For all other buttons a click means the subject is done adjusting (i.e. the response).

cursorShape

Default: hand

A string or number setting mouse cursor shape. This goes to the type input of Psychtoolbox ShowCursor—see there for more information. Standard options are:

<cds>"Arrow"<cds>
<cds>"CrossHair"<cds>
<cds>"Hand"<cds>
<cds>"SandClock"<cds>
<cds>"TextCursor"<cds>

Input properties all visual elements have

position

Input properties all adjuster elements have

adjust

Input properties all objects have

report
info

Record properties

PsychBench uses record properties to record information during experiments. You can't set record properties but you can see them in experiment results using input property report.