Added actions writing to keyframes, discovered that keyboard shortcuts broke text
This commit is contained in:
parent
fc72f4ea3e
commit
80241f7f52
|
|
@ -32,9 +32,12 @@ def onLoadFrames(self):
|
|||
self.add(j)'''
|
||||
def onClickFrame(self, x, y):
|
||||
print x, int(x/16)
|
||||
root.descendItem().activelayer.frames[root.descendItem().activelayer.currentframe].actions = MainWindow.scriptwindow.text
|
||||
root.descendItem().activeframe = int(x/16)
|
||||
MainWindow.stage.draw()
|
||||
MainWindow.scriptwindow.text = root.descendItem().activelayer.frames[root.descendItem().activelayer.currentframe].actions
|
||||
def onMouseDownGroup(self, x, y):
|
||||
self.activelayer.frames[self.activelayer.currentframe].actions = MainWindow.scriptwindow.text
|
||||
if svlgui.MODE in [" ", "s"]:
|
||||
if self.hitTest(x, y):
|
||||
self.clicked = True
|
||||
|
|
@ -52,7 +55,9 @@ def onMouseDownGroup(self, x, y):
|
|||
self.cshape.onMouseUp = onMouseUpObj
|
||||
self.cshape.onKeyDown = onKeyDownObj
|
||||
self.clicked = True
|
||||
MainWindow.scriptwindow.text = self.activelayer.frames[self.activelayer.currentframe].actions
|
||||
def onMouseDownObj(self, x, y):
|
||||
MainWindow.scriptwindow.text = root.descendItem().activelayer.frames[root.descendItem().activelayer.currentframe].actions
|
||||
self.clicked = True
|
||||
self.initx,self.inity = x-self.x, y-self.y
|
||||
if svlgui.MODE == "b":
|
||||
|
|
|
|||
|
|
@ -257,10 +257,12 @@ class MainWindowHTML:
|
|||
self.toolbox.buttons[3][1].onPress = paintbrush
|
||||
self.toolbox.buttons[4][0].onPress = pen
|
||||
self.toolbox.buttons[4][1].onPress = paint_bucket
|
||||
self.scriptwindow = svlgui.TextView()
|
||||
self.frame.layout_self( [self.toolbox,0,None,0,0,"nws",""],
|
||||
[self.timelinebox,148,0,0,None,"new","hv"],
|
||||
[self.layerbox,140,150,0,None,"n","v"],
|
||||
[self.stage,140,0,2,0,"nsew", "hv"])
|
||||
[self.timelinebox,self.toolbox._int()+148,-500,0,None,"new","hv"],
|
||||
[self.layerbox,self.toolbox._int(),self.toolbox._int().width+150,0,None,"n","v"],
|
||||
[self.scriptwindow,self.timelinebox._int(),0,0,0,"nse", "hv"],
|
||||
[self.stage,self.toolbox._int(),self.scriptwindow._int(),self.timelinebox._int()+2,0,"nsew", "hv"] )
|
||||
self.window.add(self.frame)
|
||||
|
||||
|
||||
|
|
|
|||
15
svlgui.py
15
svlgui.py
|
|
@ -711,6 +711,13 @@ class Canvas(Widget):
|
|||
self.canvas.key_up(event)
|
||||
|
||||
class TextView(Widget):
|
||||
def _gettext(self):
|
||||
if SYSTEM=="osx":
|
||||
return self.box.text
|
||||
def _settext(self, text):
|
||||
if SYSTEM=="osx":
|
||||
self.box.text = text
|
||||
text = property(_gettext, _settext)
|
||||
def __init__(self,editable=True,width=False,height=False):
|
||||
if SYSTEM=="gtk":
|
||||
self.sw=ScrolledWindow()
|
||||
|
|
@ -1400,12 +1407,20 @@ class Group (object):
|
|||
if frame<len(self.activelayer.frames) and self.activelayer.frames[frame]:
|
||||
self.activelayer.currentframe = frame
|
||||
self.activelayer.activeframe = frame
|
||||
def getcurrentframe(self):
|
||||
return self.activelayer.activeframe
|
||||
def setcurrentframe(self, frame):
|
||||
print self.activelayer.frames
|
||||
if frame<len(self.activelayer.frames) and self.activelayer.frames[frame]:
|
||||
self.activelayer.currentframe = frame
|
||||
self.activelayer.activeframe = frame
|
||||
minx = property(getminx)
|
||||
miny = property(getminy)
|
||||
maxx = property(getmaxx)
|
||||
maxy = property(getmaxy)
|
||||
activelayer = property(getal,setal)
|
||||
activeframe = property(getactiveframe, setactiveframe)
|
||||
currentframe = property(getcurrentframe, setcurrentframe)
|
||||
level = property(getlevel, setlevel)
|
||||
scale = property(fset = setscale)
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Reference in New Issue