From 86028073b8c18b2445a1bde7f5b68d0b04734d9d Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Fri, 20 Aug 2021 16:17:17 +0200 Subject: [PATCH] Printing of size --- ddresc_visu/draw.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ddresc_visu/draw.py b/ddresc_visu/draw.py index a9ffad0..f5f8e74 100644 --- a/ddresc_visu/draw.py +++ b/ddresc_visu/draw.py @@ -126,6 +126,10 @@ class Visualisation: self.order = ['@', '+', '?', '-', '/', '*'] self.squares = None self.draw() + if ev.type == pygame.KEYDOWN and ev.key == pygame.K_p: + sz = self.mapfile.size + sqsz = max(sz / CELLS, 4096) + print(f"Each square represents {sqsz} bytes.") if ev.type == pygame.USEREVENT: self.reload()