Example #1
0
 def onMouseClickCancelled(self, source, coords, button):
     if button == MouseDispatcher.LEFT_BUTTON:
         if source:
             source.unhighlight() #revert
     elif button == MouseDispatcher.RIGHT_BUTTON | \
                    MouseDispatcher.LEFT_BUTTON:
         self.disengageSweeper()
     if self.game.gameState < GuiGame.STOPPED:
         #make sure the game didn't end on last click
         CToolbar.getSmiley().setSmileTex()
Example #2
0
 def onMouseClickPrep(self, source, coords, button):
     messenger.send("hideChildren")
     if button == MouseDispatcher.LEFT_BUTTON:
         if source and (source.state == GuiCell.UNEXPLORED or
                        source.state == GuiCell.QUESTIONMARK):
             source.highlight()
             CToolbar.getSmiley().setOTex()
     elif button == MouseDispatcher.RIGHT_BUTTON | \
                    MouseDispatcher.LEFT_BUTTON:
         self.engageSweeper()
         CToolbar.getSmiley().setOTex()