Hello! I am currently struggling to figure out how to make this idea work, and I would love any input/feedback you all have.
So far, I have hard coded a bunch of potential positions these shapes can appear in. I am able to create a loop where rectangles appear in all locations by saying:
for p in all_pos:
rect.pos = p; rect.draw(); win.flip()
This works totally fine and creates the following image on my screen:
I want my future participants to be able to click on a rectangle and a Gabor to appear within it. This is the part I am struggling with. All of the code is currently in a loop (e.g., for i in range(0, trials)), including this generation of rectangles. Currently, after the rectangle code, I have:
if mouse.isPressedIn(rect):
gabor.pos = rect.pos; gabor.draw(); keys = kb.waitKeys(keyList = ['return']); win.flip()
I have the waitkeys there to let the participants click on as many rectangles as they want. The issue I am running into is either the window flips too fast if the Gabors/mouse code is in the loop, or the Gabors don’t generate if it’s outside the loop.
Any input would be greatly appreciated! Thank you for your help!
