Fixed keyboard shortcuts
This commit is contained in:
parent
710436b62e
commit
ffb9a82413
|
|
@ -39,7 +39,14 @@ def onClickFrame(self, x, y):
|
||||||
root.descendItem().activeframe = int(x/16)
|
root.descendItem().activeframe = int(x/16)
|
||||||
MainWindow.stage.draw()
|
MainWindow.stage.draw()
|
||||||
MainWindow.scriptwindow.text = root.descendItem().activelayer.frames[root.descendItem().activelayer.currentframe].actions
|
MainWindow.scriptwindow.text = root.descendItem().activelayer.frames[root.descendItem().activelayer.currentframe].actions
|
||||||
|
def onKeyDownFrame(self, key):
|
||||||
|
if key=="F6":
|
||||||
|
add_keyframe()
|
||||||
def onMouseDownGroup(self, x, y):
|
def onMouseDownGroup(self, x, y):
|
||||||
|
print ">>>", MainWindow.scriptwindow.text
|
||||||
|
print dir(MainWindow.scriptwindow._int())
|
||||||
|
#MainWindow.scriptwindow._int().become_target()
|
||||||
|
print MainWindow.scriptwindow._int().is_target()
|
||||||
self.activelayer.frames[self.activelayer.currentframe].actions = MainWindow.scriptwindow.text
|
self.activelayer.frames[self.activelayer.currentframe].actions = MainWindow.scriptwindow.text
|
||||||
if svlgui.MODE in [" ", "s"]:
|
if svlgui.MODE in [" ", "s"]:
|
||||||
if self.hitTest(x, y):
|
if self.hitTest(x, y):
|
||||||
|
|
@ -187,6 +194,7 @@ frames = svlgui.Group(onload=onLoadFrames)
|
||||||
b = svlgui.Image("media/keyframe_active.png",0,0,True,MainWindow.timelinebox,16,1)
|
b = svlgui.Image("media/keyframe_active.png",0,0,True,MainWindow.timelinebox,16,1)
|
||||||
frames.add(b)
|
frames.add(b)
|
||||||
frames.onMouseDown = onClickFrame
|
frames.onMouseDown = onClickFrame
|
||||||
|
frames.onKeyDown = onKeyDownFrame
|
||||||
MainWindow.timelinebox.add(frames,0,0)
|
MainWindow.timelinebox.add(frames,0,0)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
20
svlgui.py
20
svlgui.py
|
|
@ -217,12 +217,12 @@ if SYSTEM=="osx":
|
||||||
OSXWindow.__init__(self,*args,**kwargs)
|
OSXWindow.__init__(self,*args,**kwargs)
|
||||||
#def save_cmd(widget=None):
|
#def save_cmd(widget=None):
|
||||||
# print "to save"
|
# print "to save"
|
||||||
def key_down(self, event):
|
#def key_down(self, event):
|
||||||
if FOCUS:
|
# if FOCUS:
|
||||||
FOCUS.key_down(event)
|
# FOCUS.key_down(event)
|
||||||
def key_up(self, event):
|
#def key_up(self, event):
|
||||||
if FOCUS:
|
# if FOCUS:
|
||||||
FOCUS.key_up(event)
|
# FOCUS.key_up(event)
|
||||||
|
|
||||||
|
|
||||||
app = Lightningbeam()
|
app = Lightningbeam()
|
||||||
|
|
@ -615,6 +615,7 @@ class Canvas(Widget):
|
||||||
i.draw(canvas)
|
i.draw(canvas)
|
||||||
|
|
||||||
def mouse_down(self, event):
|
def mouse_down(self, event):
|
||||||
|
self.become_target()
|
||||||
x, y = event.position
|
x, y = event.position
|
||||||
for i in self.objs:
|
for i in self.objs:
|
||||||
i._onMouseDown(x, y)
|
i._onMouseDown(x, y)
|
||||||
|
|
@ -734,7 +735,11 @@ class TextView(Widget):
|
||||||
self.scroll_to_mark(self.get_buffer().get_insert(), 0)
|
self.scroll_to_mark(self.get_buffer().get_insert(), 0)
|
||||||
self.box.connect("key-press-event",scroll)
|
self.box.connect("key-press-event",scroll)
|
||||||
elif SYSTEM=="osx":
|
elif SYSTEM=="osx":
|
||||||
self.box = GUI.TextEditor(scrolling="hv")
|
class OSXTextEditor(GUI.TextEditor):
|
||||||
|
|
||||||
|
def mouse_down(self, event):
|
||||||
|
self.become_target()
|
||||||
|
self.box = OSXTextEditor(scrolling="hv")
|
||||||
self.box.font = Font("Mono", 12, [])
|
self.box.font = Font("Mono", 12, [])
|
||||||
elif SYSTEM=="html":
|
elif SYSTEM=="html":
|
||||||
self.box = htmlobj("textarea")
|
self.box = htmlobj("textarea")
|
||||||
|
|
@ -1108,6 +1113,7 @@ class frame:
|
||||||
self.currentselect=None
|
self.currentselect=None
|
||||||
self.type="Group"
|
self.type="Group"
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
|
self.actions = ''
|
||||||
def add(self, obj, x, y, rot=0, scalex=0, scaley=0):
|
def add(self, obj, x, y, rot=0, scalex=0, scaley=0):
|
||||||
self.objs.append(framewrapper(obj, x, y, rot, scalex, scaley, self.objs))
|
self.objs.append(framewrapper(obj, x, y, rot, scalex, scaley, self.objs))
|
||||||
def play(self, group, cr, currentselect,transform,rect):
|
def play(self, group, cr, currentselect,transform,rect):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue