mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-26 16:56:37 +00:00
libroar/RoarCanvasWindow.py:onKeyboardInput(): simulate LMB & advance to the right w/ space key except w/ Text tool.
This commit is contained in:
parent
e21bb17e51
commit
09c0df13cf
@ -190,6 +190,17 @@ class RoarCanvasWindow(GuiWindow):
|
|||||||
self.brushPos = [self.brushPos[0], self.canvas.size[1] - 1]
|
self.brushPos = [self.brushPos[0], self.canvas.size[1] - 1]
|
||||||
self.commands.update(cellPos=self.brushPos)
|
self.commands.update(cellPos=self.brushPos)
|
||||||
self.applyTool(eventDc, True, None, None, None, self.brushPos, False, False, False, self.commands.currentTool, viewRect)
|
self.applyTool(eventDc, True, None, None, None, self.brushPos, False, False, False, self.commands.currentTool, viewRect)
|
||||||
|
elif (chr(event.GetUnicodeKey()) == " ") \
|
||||||
|
and (self.commands.currentTool.__class__ != ToolText):
|
||||||
|
if not self.applyTool(eventDc, True, None, None, event.GetModifiers(), self.brushPos, False, True, False, self.commands.currentTool, viewRect):
|
||||||
|
event.Skip()
|
||||||
|
else:
|
||||||
|
if self.brushPos[0] < (self.canvas.size[0] - 1):
|
||||||
|
self.brushPos = [self.brushPos[0] + 1, self.brushPos[1]]
|
||||||
|
else:
|
||||||
|
self.brushPos = [0, self.brushPos[1]]
|
||||||
|
self.commands.update(cellPos=self.brushPos)
|
||||||
|
self.applyTool(eventDc, True, None, None, None, self.brushPos, False, False, False, self.commands.currentTool, viewRect)
|
||||||
else:
|
else:
|
||||||
if not self.applyTool(eventDc, False, chr(event.GetUnicodeKey()), keyCode, keyModifiers, None, None, None, None, self.commands.currentTool, viewRect):
|
if not self.applyTool(eventDc, False, chr(event.GetUnicodeKey()), keyCode, keyModifiers, None, None, None, None, self.commands.currentTool, viewRect):
|
||||||
event.Skip()
|
event.Skip()
|
||||||
|
Loading…
Reference in New Issue
Block a user