Cross on a picture and eye tribe
Hello, i've got a little problem with a script and the eye tribe. Indeed, when I test my script without the eye tribe it works very well but when I try to record the data with the eye tribe, I've got a litlle problem. The aim of my experiment is to show a text and make people put a cross on certain letters. So it works vey well but when I put the eye tribe it's like it draws an "arrow", i've got a cross in the correct location but there is also a cross that appears at the top left of each click.
from openexp.canvas import canvas
from openexp.mouse import mouse
my_mouse = mouse(exp, buttonlist = ([1]), visible = True)
my_canvas = canvas(exp)
text=exp.pool[u'Texte.jpg']
my_canvas.image(text)
cross = exp.pool[u'croix.png']
my_canvas.show()
start = clock.time()
my_mouse.set_pos(pos=(0, 0))
while clock.time() - start <= 100000:
button, position, timestamp = my_mouse.get_click(timeout=10)
x,y = position if button is not None else (None,None)
if button is not None:
(x0, y0) = (None,None)
while my_mouse.get_pressed()==(1,0,0):
(x, y), timestamp = my_mouse.get_pos()
if (x0,y0) != (None, None):
my_canvas.image(cross, x=x0, y=y0)
#my_canvas.line(x0,y0,x,y, penwidth=8)
my_canvas.image(cross, x=x, y=y)
else:
my_canvas.image(cross, x=x, y=y)
(x0,y0) = (x,y)
my_canvas.show()
Can someone have an idea of how I can fix this issue ?
Thanks