comparison src/parpg/objects/action.py @ 81:5508000aceaf

Fixed bug in the text splitting code of ExamineAction.
author KarstenBock@gmx.net
date Thu, 08 Sep 2011 18:56:10 +0200
parents c25c734bd2a7
children a85d58fcd253
comparison
equal deleted inserted replaced
80:84d03dc70904 81:5508000aceaf
206 action_text = self.examine_desc 206 action_text = self.examine_desc
207 self.view.hud.addAction(unicode(action_text)) 207 self.view.hud.addAction(unicode(action_text))
208 logger.debug(action_text) 208 logger.debug(action_text)
209 #this code will cut the line up into smaller lines that will be displayed 209 #this code will cut the line up into smaller lines that will be displayed
210 place = 25 210 place = 25
211 while place <= len(action_text): 211 while place < len(action_text):
212 if action_text[place] == ' ': 212 if action_text[place] == ' ':
213 action_text = action_text[:place] +'\n'+action_text[place:] 213 action_text = action_text[:place] +'\n'+action_text[place:]
214 place += 26 #plus 1 character to offset the new line 214 place += 26 #plus 1 character to offset the new line
215 else: place += 1 215 else: place += 1
216 self.view.displayObjectText(self.examine_id, unicode(action_text), time=3000) 216 self.view.displayObjectText(self.examine_id, unicode(action_text), time=3000)