Ignore:
Timestamp:
09/24/09 04:58:09 (10 years ago)
Author:
orlandov
Message:

Ticket 101: Load NPC avatar image filename from the YAML dialogue file. fixes[s:trac, t:101]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/dialoguegui.py

    r287 r288  
    5050            'start_quest': self.startQuest, 
    5151            'complete_quest': self.completeQuest, 
     52            'npc_avatar': self.handleAvatarImage, 
    5253            'end': self.handleEnd 
    5354        } 
     
    120121        self.npc.behaviour.idle() 
    121122 
     123    def handleAvatarImage(self, image): 
     124        """Callback to handle when the dialogue engine wants to set the NPC image 
     125           @type image: str 
     126           @param image: filename of avatar image""" 
     127        avatar_image = self.dialogue_gui.findChild(name='npc_avatar') 
     128        avatar_image.image = image 
     129 
    122130    def handleResponses(self, *args): 
    123131        """Callback to handle when the dialogue engine wants to display a new 
Note: See TracChangeset for help on using the changeset viewer.