From: lbcmk <30442978+lbcmk@users.noreply.github.com> Date: Wed, 13 Jul 2022 20:53:40 +0000 (-0400) Subject: Fix X-Git-Url: http://git.skullheadx.com/phil/index.html?a=commitdiff_plain;h=394b9a42a4f3628d7982f6cc15a6cc33e75dcae9;p=Pygame-Jam.git Fix --- diff --git a/UI/Dialogue.py b/UI/Dialogue.py index b277f3e..1581466 100644 --- a/UI/Dialogue.py +++ b/UI/Dialogue.py @@ -27,25 +27,23 @@ class DialogueUI: return; def draw(self, surf, agent, text, sec, ID, Xt=-10000, Yt=-10000): - + if(not ID in self.IDS): temp = [] - c = [] self.PSA += sec temp.append(text) temp.append(self.PSA) - c.append(Xt) - c.append(Yt) - temp.append(c) + temp.append(agent) + temp.append(Xt == -10000 and Yt == -10000) self.IDS.append(ID) - self.dialogue_list.append(temp) + self.dialogue_list.append(temp) try: X, Y = 0, 0 try: - if(self.dialogue_list[self.char][2][0] == -10000 and self.dialogue_list[self.char][2][1] == -10000): - X = get_display_point(agent.position)[0] + agent.width / 2 - Y = get_display_point(agent.position)[1] + if(self.dialogue_list[self.char][3] == True): + X = get_display_point(self.dialogue_list[self.char][2].position)[0] + agent.width / 2 + Y = get_display_point(self.dialogue_list[self.char][2].position)[1] else: X, Y = get_display_point((self.dialogue_list[self.char][2][0], self.dialogue_list[self.char][2][1])) @@ -61,6 +59,7 @@ class DialogueUI: self.text = self.dialogue_list[self.char][0] except: pass; + self.checkTime() self.createDialogue()