spacebar_end_routine_after_rating.py 472 B

1234567891011121314151617
  1. keys = event.getKeys()
  2. # need to manually check for escape, as our key checking will interfere with
  3. # Builder's escape check:
  4. if 'escape' in keys:
  5. core.quit()
  6. if 'space' in keys:
  7. # check how many ratings have been completed:
  8. completed_ratings = 0
  9. for Slider in [mainSoundsratings]:
  10. if Slider.getRating() is not None:
  11. completed_ratings = completed_ratings + 1
  12. if completed_ratings == 1:
  13. continueRoutine = False # end now