def render(self, screen): screen.fill((255, 125, 180)) screen.blit(self.text, (5, 480)) media.put_string(f'{self.turns.round}', screen, (0, 0)) self.GUI.draw_things() # self.cartica.show(screen, self.grid.inside_grid.bottomleft) pygame.display.update()
def showing_info(self): self.info.surface.fill((240, 120, 0)) media.put_string(self.info.words, self.info.surface, (10, 10)) self.screen.blit(self.info.surface, self.info.rect) # Dibujar cuadro # Comparar si Showed es una carta o un personaje # Mostrar informacion del Showed if self.Showed is None: return
def show(self, screen, offset): # Colocarlo en una posicion especifica del grid i = 0 for cards in self.showing: cards.show(screen, (offset[0] + i * cards.rect.width + 20, offset[1] + 20)) media.put_string(f'{cards.type}', screen, cards.rect.midbottom) i += 1 i = 0 for cards in self.cards: cards.show(screen, (offset[0] - 40, 20 + offset[1] - i)) i += 1 media.put_string(f'{cards.type}', screen, cards.rect.midbottom)
def show_data(self, screen, dim): '''Mover a GUI''' pygame.draw.rect(screen, (0, 255, 125), dim) media.put_string(self.player.name, screen, (dim[0] + 5, dim[1] + 5))
def render(self, screen): screen.blit(self.background, (0, 0)) pygame.draw.rect(screen, (0, 255, 0), self.box1) pygame.draw.rect(screen, (255, 0, 0), self.box2) media.put_string("Jugar", screen, self.box1.center) media.put_string("Salir", screen, self.box2.center)