def draw_text(self): pygame.draw.rect(self.screen, con.WHITE, self.text_rect) utils.talk_dialog(self.screen, self.complete_text, self.font, width_offset=20, height_offset=self.counter)
def draw_menu(self): utils.talk_dialog(self.screen, self.window_text_list, self.font, width_offset=0, height_offset=0, line_length=30, color=(255, 255, 255))
def _draw_user_input_window(self): pygame.draw.rect(self.screen, self.user_text_rect_background_color, self.user_rect) utils.talk_dialog(self.screen, self.text, self.font, width_offset=15, height_offset=300, line_length=50)
def _draw_big_window(self): pygame.draw.rect(self.screen, self.big_window_background_color, self.window_background_rect) utils.talk_dialog(self.screen, self.window_text_list, self.font, width_offset=15, height_offset=5, line_length=50)
def draw(self): self.screen.fill(self.BG_COLOR) # ---------------------- pygame.draw.rect(self.screen, con.WHITE, self.text_window_rect) yes_blit_rect = self.screen.blit(self.yes_image, (490, 240)) no_blit_rect = self.screen.blit(self.no_image, (10, 240)) # ---------------------- utils.talk_dialog(self.screen, self.text_list, self.font, 20, 10) # -------------------------------------------------- if not self.mouse_pos == None: yes_result = yes_blit_rect.collidepoint(self.mouse_pos[0], self.mouse_pos[1]) no_result = no_blit_rect.collidepoint(self.mouse_pos[0], self.mouse_pos[1]) self.mouse_pos = None if yes_result == 1: self.message = "yes" self.keep_looping = False if no_result == 1: self.message = "no" self.keep_looping = False # -------------------------------------------------- pygame.display.flip()