keybinding for grid
This commit is contained in:
parent
94406eef23
commit
6d7cfbf2be
@ -101,6 +101,15 @@ class Painter(Widget):
|
|||||||
self.unselected=[]
|
self.unselected=[]
|
||||||
self.draw()
|
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):
|
def on_key_up(self, keyboard, keycode):
|
||||||
if keycode[1]=="shift":
|
if keycode[1]=="shift":
|
||||||
if 's' in self.modifiers:
|
if 's' in self.modifiers:
|
||||||
|
Loading…
Reference in New Issue
Block a user