Skip to content

Commit 2e66dc1

Browse files
committed
ENH: Disable correctAns ctrl for JoyButtons when it would not be used in boilerplate
1 parent f9ef1be commit 2e66dc1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

psychopy/experiment/components/joyButtons/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ def __init__(self, exp, parentName, name='button_resp',
8989
hint=msg,
9090
label=_localized['storeCorrect'])
9191

92+
self.depends += [ # allows params to turn each other off/on
93+
{"dependsOn": "storeCorrect", # must be param name
94+
"condition": "== True", # val to check for
95+
"param": "correctAns", # param property to alter
96+
"true": "enable", # what to do with param if condition is True
97+
"false": "disable", # permitted: hide, show, enable, disable
98+
}
99+
]
100+
92101
msg = _translate(
93102
"What is the 'correct' key? Might be helpful to add a "
94103
"correctAns column and use $correctAns to compare to the key "

0 commit comments

Comments
 (0)