Esempio n. 1
0
 def on_select(self, model, x, y):
     Hotspot.on_select(self, model, x, y)
     
     item = self.items[self.selection_y]
     if item.text != "":
         model.display_info(item.effect.name+"<br /><br />"+item.effect.description)
     else:
         model.display_info(None)
Esempio n. 2
0
 def on_select(self, model, x, y):
     '''
     The player just hovered over a tile, update the UI to indicate what is present in the tile.
     '''
     Hotspot.on_select(self, model, x, y)
     
     tile = model.map.get_tile(self.grid_x + x, self.grid_y + y)
     text = None
     
     if tile is not None:
         if tile.entity is not None:
             text = tile.entity.name
         elif tile.room is not None:
             text = tile.room.name + " " + str(tile.room.count_connections())
     
     model.display_info(text)
     model.do_update('log')