diff --git a/src/editor.py b/src/editor.py index d512737..fed8a3c 100644 --- a/src/editor.py +++ b/src/editor.py @@ -225,8 +225,9 @@ class Editor: h2 = self.height / 2 x0 = w2 - width / 2 y0 = h2 - height / 2 + loaded_width = 0 if total == 0 else width * count / total pygame.draw.rect(self.win, (160, 160, 160), [x0, y0, width, height]) - pygame.draw.rect(self.win, (90, 250, 90), [x0, y0, width * count / total, height]) + pygame.draw.rect(self.win, (90, 250, 90), [x0, y0, loaded_width, height]) self.win.blit(txt, [w2 - txt.get_width() / 2, y0 - txt.get_height() - 5]) pygame.display.flip()