Closed esdalmaijer closed 10 years ago
https://github.com/esdalmaijer/PyGaze/blob/master/pygaze-0.4/libinput.py#L452
for b in range(0,len(pressed)): if pressed[b] == 1: if mousebuttonlist == None or b+1 in mousebuttonlist: return b+1, self.get_pos(), time
Entire for loop could be replaced by:
return pressed.index(1)+1, self.get_pos(), time
Decided against this, since I forgot to take into account the mousebuttonlist for the alternative option. This would require some array logics or another for loop, therefore simplifying nothing.
https://github.com/esdalmaijer/PyGaze/blob/master/pygaze-0.4/libinput.py#L452
Entire for loop could be replaced by: