Exemple #1
0
 def cb_click(self, area, event):
     for chit in self.chits:
         if chit.point_inside((event.x, event.y)):
             self.clicked_on_chit(area, event, chit)
             return True
     for guihex in self.guihexes.itervalues():
         if guiutils.point_in_polygon((event.x, event.y), guihex.points):
             hexlabel = guihex.battlehex.label
             chits = self.chits_in_hex(hexlabel)
             if len(chits) == 1:
                 chit = chits[0]
                 self.clicked_on_chit(area, event, chit)
             else:
                 self.clicked_on_hex(area, event, guihex)
             return True
     self.clicked_on_background(area, event)
     return True
Exemple #2
0
 def cb_click(self, area, event):
     for chit in self.chits:
         if chit.point_inside((event.x, event.y)):
             self.clicked_on_chit(area, event, chit)
             return True
     for guihex in self.guihexes.itervalues():
         if guiutils.point_in_polygon((event.x, event.y), guihex.points):
             hexlabel = guihex.battlehex.label
             chits = self.chits_in_hex(hexlabel)
             if len(chits) == 1:
                 chit = chits[0]
                 self.clicked_on_chit(area, event, chit)
             else:
                 self.clicked_on_hex(area, event, guihex)
             return True
     self.clicked_on_background(area, event)
     return True
Exemple #3
0
 def cb_click(self, area, event):
     for guihex in self.guihexes.itervalues():
         if guiutils.point_in_polygon((event.x, event.y), guihex.points):
             self.clicked_on_hex(area, event, guihex)
             return True
     return True
Exemple #4
0
 def cb_click(self, area, event):
     for guihex in self.guihexes.itervalues():
         if guiutils.point_in_polygon((event.x, event.y), guihex.points):
             self.clicked_on_hex(area, event, guihex)
             return True
     return True