SirMoM / game

Gloria! A strategic game
1 stars 0 forks source link

Truncate Ressourcen anzeigen #19

Closed SirMoM closed 6 years ago

SirMoM commented 6 years ago

Die Resourcen anzeigen mit truncate realisieren statt mit round

def render_reassures_bar(self):
        if self.level.wood >= 1:
            self.screen.blit(pygame.image.load(os.path.join(parent_dir, "textures/resources/wood.png")), (10, 10))
            str_anz_wood = ": %.f" % self.level.wood
            text_surface = self.my_font.render(str_anz_wood, False, (0, 0, 0))
            self.screen.blit(text_surface, (52, 5))

        if self.level.stone >= 1:
            self.screen.blit(pygame.image.load(os.path.join(parent_dir, "textures/resources/stone2.png")), (10, 42))
            str_anz_stone = ": %.f" % self.level.stone
            text_surface = self.my_font.render(str_anz_stone, False, (0, 0, 0))
            self.screen.blit(text_surface, (52, 42))

        if self.level.iron >= 1:
            self.screen.blit(pygame.image.load(os.path.join(parent_dir, "textures/resources/iron.png")), (10, 74))
            str_anz_iron = ": %.f" % self.level.iron
            text_surface = self.my_font.render(str_anz_iron, False, (0, 0, 0))
self.screen.blit(text_surface, (52, 74))