keybinding for grid

This commit is contained in:
Ian Jauslin 2021-12-06 13:11:39 -05:00
parent 94406eef23
commit 6d7cfbf2be

View File

@ -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: