Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/visual/ButtonStim.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,18 @@ export class ButtonStim extends TextBox
{
return this.listener.isPressedIn(this, [1, 0, 0]);
}

/**
* Clear previously stored times on / off and check current click state.
*
* In Builder, this is called at the start of each routine.
*/
reset() {

// Update wasClicked (so continued clicks at routine start are considered)
this.wasClicked = this.isClicked
// Clear on/off times
this.timesOn = []
this.timesOff = []
}
}