def on_mouseButtonDown_left(self,event): """ Outputs information about the monster under the cursor. Only works when not autoplaying. """ if not self.autoplaying: screenCoords = Coords.make(event.pos) boardCoords = screenCoords // self.gfxConfig.TILE_WIDTH boardElement = self.simulation.get(boardCoords) if isinstance(boardElement,Monster): print "<{0}, {1}>".format(boardElement.infoString,boardCoords)
def on_mouseButtonDown_right(self,event): """ Follows or unfollows the monster under the cursor (naming it if it has not been named). Only works when not autoplaying. """ if not self.autoplaying: screenCoords = Coords.make(event.pos) boardCoords = screenCoords // self.gfxConfig.TILE_WIDTH boardElement = self.simulation.get(boardCoords) if isinstance(boardElement,Monster): self.simulation.toggleMonsterFollowed(boardElement)