diff --git a/lightningbeam b/lightningbeam index a3834e8..06af11e 100755 --- a/lightningbeam +++ b/lightningbeam @@ -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": diff --git a/lightningbeam_windows.py b/lightningbeam_windows.py index dc4d6dc..41565f2 100644 --- a/lightningbeam_windows.py +++ b/lightningbeam_windows.py @@ -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) diff --git a/svlgui.py b/svlgui.py index 866f5dc..2024df1 100644 --- a/svlgui.py +++ b/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