Пример #1
0
	def __display_resp(self):
	
		main_center_loc = [BOARD_SIZE[0]/2, BOARD_SIZE[1]/2]
	
		# generate marker surfaces
		correct_surf = gen.correct_surface(True)
		incorrect_surf = gen.correct_surface(False)
		
		# generate character and text surfaces
		cat_surf = gen.text_surface((str(self.cur_block.category).upper()))
		char_surf = self.players[self.state.buzzed_player].char_surface
		text_surf = gen.text_surface(self.cur_block.response, BOARD_SIZE[0], BOARD_SIZE[1], 40, WHITE, "korinna")
		
		# scale character surface
		scaled_image = pygame.transform.scale(char_surf, (char_surf.get_width()*3, char_surf.get_height()*3))
	
		# fill screen
		self.SCREEN.fill(BLUE)
		
		# blit character and text to screen
		util.blit_alpha(self.SCREEN, scaled_image, (0, DISPLAY_RES[1]-scaled_image.get_height()), 100)
		self.SCREEN.blit(char_surf, (0, DISPLAY_RES[1]-char_surf.get_height()))
		
		# blit response
		self.SCREEN.blit(cat_surf, (DISPLAY_RES[0]/2 - BOARD_SIZE[0]/2, -200))
		self.SCREEN.blit(text_surf, (DISPLAY_RES[0]/2 - BOARD_SIZE[0]/2,0))
		
		# blit markers
		if not (self.state.buzzed_timeout or self.state.clue_timeout):
		
			self.SCREEN.blit(correct_surf, (main_center_loc[0]-100, main_center_loc[1]+150))
			self.SCREEN.blit(incorrect_surf, (main_center_loc[0]+incorrect_surf.get_width(), main_center_loc[1]+150))
Пример #2
0
    def __display_resp(self):

        main_center_loc = [BOARD_SIZE[0] / 2, BOARD_SIZE[1] / 2]

        # generate marker surfaces
        correct_surf = gen.correct_surface(True)
        incorrect_surf = gen.correct_surface(False)

        # generate character and text surfaces
        cat_surf = gen.text_surface((str(self.cur_block.category).upper()))
        char_surf = self.players[self.state.buzzed_player].char_surface
        text_surf = gen.text_surface(self.cur_block.response, BOARD_SIZE[0],
                                     BOARD_SIZE[1], 40, WHITE, "korinna")

        # scale character surface
        scaled_image = pygame.transform.scale(
            char_surf, (char_surf.get_width() * 3, char_surf.get_height() * 3))

        # fill screen
        self.SCREEN.fill(BLUE)

        # blit character and text to screen
        util.blit_alpha(self.SCREEN, scaled_image,
                        (0, DISPLAY_RES[1] - scaled_image.get_height()), 100)
        self.SCREEN.blit(char_surf,
                         (0, DISPLAY_RES[1] - char_surf.get_height()))

        # blit response
        self.SCREEN.blit(cat_surf,
                         (DISPLAY_RES[0] / 2 - BOARD_SIZE[0] / 2, -200))
        self.SCREEN.blit(text_surf,
                         (DISPLAY_RES[0] / 2 - BOARD_SIZE[0] / 2, 0))

        # blit markers
        if not (self.state.buzzed_timeout or self.state.clue_timeout):
            self.SCREEN.blit(
                correct_surf,
                (main_center_loc[0] - 100, main_center_loc[1] + 150))
            self.SCREEN.blit(incorrect_surf,
                             (main_center_loc[0] + incorrect_surf.get_width(),
                              main_center_loc[1] + 150))

        # read response
        if self.state.init: self.__ttsx_speak(self.cur_block.response)
Пример #3
0
	def __display_final_check(self):
	
		main_center_loc = [BOARD_SIZE[0]/2, BOARD_SIZE[1]/2]
	
		correct_surf = gen.correct_surface(True)
		incorrect_surf = gen.correct_surface(False)
	
		# fill screen
		self.SCREEN.fill(BLUE)
		
		# blit response
		self.SCREEN.blit(gen.text_surface(self.cur_block.response), (DISPLAY_RES[0]/2 - BOARD_SIZE[0]/2,0))
		
		# blit markers
		self.SCREEN.blit(correct_surf, (main_center_loc[0]-100, main_center_loc[1]+100))
		self.SCREEN.blit(incorrect_surf, (main_center_loc[0]+incorrect_surf.get_width(), main_center_loc[1]+100))
		
		# blit all characters
		self.__blit_all_characters(self.SCREEN)
Пример #4
0
    def __display_final_check(self):

        main_center_loc = [BOARD_SIZE[0] / 2, BOARD_SIZE[1] / 2]

        correct_surf = gen.correct_surface(True)
        incorrect_surf = gen.correct_surface(False)

        # fill screen
        self.SCREEN.fill(BLUE)

        # blit response
        self.SCREEN.blit(gen.text_surface(self.cur_block.response),
                         (DISPLAY_RES[0] / 2 - BOARD_SIZE[0] / 2, 0))

        # blit markers
        self.SCREEN.blit(correct_surf,
                         (main_center_loc[0] - 100, main_center_loc[1] + 100))
        self.SCREEN.blit(incorrect_surf,
                         (main_center_loc[0] + incorrect_surf.get_width(),
                          main_center_loc[1] + 100))

        # blit all characters
        self.__blit_all_characters(self.SCREEN)