+def _default_event_cb(self, id, wmp):
+ '''Called when the library has some data for the user.'''
+ if id != self.selectedWiimoteIndex : return
+ wm = wmp[0]
+ pos = (wm.ir.x, wm.ir.y)
+ pygame.mouse.set_pos(pos)
+
+ eventType = None
+
+ if wm.btns and \
+ wiiuse.is_just_pressed(wm, wiiuse.button['B']) :
+ event = pygame.event.Event(pygame.MOUSEBUTTONDOWN,
+ pos = pos,
+ button = 1)
+ pygame.event.post(event)
+
+ if wm.btns_released and \
+ wiiuse.is_released(wm, wiiuse.button['B']):
+ event = pygame.event.Event(pygame.MOUSEBUTTONUP,
+ pos = pos,
+ button = 1)
+ pygame.event.post(event)
+
+
+