diff --git a/painter.py b/painter.py index e196f13..9a121aa 100644 --- a/painter.py +++ b/painter.py @@ -101,6 +101,15 @@ class Painter(Widget): self.unselected=[] self.draw() + # toggle grid + elif keycode[1]=="g": + for particle in self.selected: + if particle.grid==0: + particle.grid=1 + else: + particle.grid=-particle.grid + self.draw() + def on_key_up(self, keyboard, keycode): if keycode[1]=="shift": if 's' in self.modifiers: