Merge branch 'feat/graph-edition' of https://git.kb28.ch/HEL/LycacraftMaps into feat/graph-edition

This commit is contained in:
Toby Lane 2024-06-30 22:16:09 +02:00
commit 25f1b20a7a

View File

@ -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()