From 6d7cfbf2bee7a878681ccdd3ef80b95ea8894758 Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Mon, 6 Dec 2021 13:11:39 -0500 Subject: [PATCH] keybinding for grid --- painter.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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: