Class: ButtonStim

visual.ButtonStim(options)

new ButtonStim(options)

ButtonStim visual stimulus.

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
win module:core.Window the associated Window
name String the name used when logging messages from this stimulus
text string <optional>
"" the text to be rendered
font string <optional>
"Arial" the font family
pos Array.<number> <optional>
[0, 0] the position of the center of the text
anchor string <optional>
"center" horizontal alignment
units string <optional>
"norm" the units of the text size and position
color Color <optional>
Color("white") the background color
fillColor Color <optional>
Color("darkgrey") the fill color
borderColor Color <optional>
Color("white") the border color
borderWidth Color <optional>
0 the border width
opacity number <optional>
1.0 the opacity
letterHeight number <optional>
the height of the text
bold boolean <optional>
true whether or not the text is bold
italic boolean <optional>
false whether or not the text is italic
autoDraw boolean <optional>
false whether or not the stimulus should be automatically drawn on every frame flip
autoLog boolean <optional>
false whether or not to log
Source:

Extends

  • TextBox

Members

isClicked

Is this button currently being clicked on?
Source:

numClicks

How many times has this button been clicked on?
Source: