Merge branch 'master' of github.com:skykooler/Lightningbeam

This commit is contained in:
Skyler Lehmkuhl 2012-01-18 22:46:59 -05:00
commit 1e6fb1880e
3 changed files with 30 additions and 2 deletions

17
base.js
View File

@ -445,6 +445,23 @@ function Shape() {
} }
} }
function TextField() {
/*From the ActionScript reference:
To create a text field dynamically, you do not use the new operator.
Instead, you use MovieClip.createTextField(). The default size for a
text field is 100 x 100 pixels.
*/
this._x = 0;
this._y = 0;
this.textHeight = 100;
this.textWidth = 100;
this.text = "";
this.draw = function(frame,frame2,r) {
}
}
var _rootFrame = new Frame() var _rootFrame = new Frame()
var _root = new MovieClip() var _root = new MovieClip()

View File

@ -300,6 +300,7 @@ class MainWindowOSX:
self.tinstancename._int().color = svlgui.Color("#aaaaaa").pygui self.tinstancename._int().color = svlgui.Color("#aaaaaa").pygui
self.tinstancename._int().mouse_down = self.darkentinstance self.tinstancename._int().mouse_down = self.darkentinstance
self.tinstancename.set_action(self.setFontInstanceName) self.tinstancename.set_action(self.setFontInstanceName)
self.tinstancename.disable()
self.textbox.layout_self([self.tgroup[0],10,None,5,None,"nw",""], self.textbox.layout_self([self.tgroup[0],10,None,5,None,"nw",""],
[self.tgroup[1],10,None,self.tgroup[0]._int(),None,"nw",""], [self.tgroup[1],10,None,self.tgroup[0]._int(),None,"nw",""],
[self.tgroup[2],10,None,self.tgroup[1]._int(),None,"nw",""], [self.tgroup[2],10,None,self.tgroup[1]._int(),None,"nw",""],
@ -321,8 +322,8 @@ class MainWindowOSX:
#[self.timelinebox,self.paintbox._int()+148,-500,0,None,"new","hv"], #[self.timelinebox,self.paintbox._int()+148,-500,0,None,"new","hv"],
[self.layerbox,self.toolbox._int(),self.toolbox._int().width+150,0,None,"n","v"], [self.layerbox,self.toolbox._int(),self.toolbox._int().width+150,0,None,"n","v"],
#[self.layerbox,self.paintbox._int(),self.toolbox._int().width+150,0,None,"n","v"], #[self.layerbox,self.paintbox._int(),self.toolbox._int().width+150,0,None,"n","v"],
[self.docbox,self.toolbox._int(),0,None,0,"wse", ""], [self.docbox,self.toolbox._int(),0,-200,0,"wse", ""],
[self.textbox,self.toolbox._int(),0,None,0,"wse", ""], [self.textbox,self.toolbox._int(),0,-200,0,"wse", ""],
[self.scriptwindow,self.timelinebox._int(),0,0,self.docbox._int(),"nse", "hv"], [self.scriptwindow,self.timelinebox._int(),0,0,self.docbox._int(),"nse", "hv"],
[self.stage,self.toolbox._int(),self.scriptwindow._int(),self.timelinebox._int()+2,self.docbox._int(),"nsew", "hv"], [self.stage,self.toolbox._int(),self.scriptwindow._int(),self.timelinebox._int()+2,self.docbox._int(),"nsew", "hv"],
[self.paintbox,0,self.stage._int(),self.toolbox._int(),None,"nw","v"] ) [self.paintbox,0,self.stage._int(),self.toolbox._int(),None,"nw","v"] )

View File

@ -170,6 +170,7 @@ if sys.platform=="linux2":
#app = GUI.application() #app = GUI.application()
SYSTEM="osx" SYSTEM="osx"
TEMPDIR = "/tmp" TEMPDIR = "/tmp"
FONT = u'Times New Roman'
''' '''
SYSTEM="html" SYSTEM="html"
ids = {} ids = {}
@ -703,8 +704,14 @@ class Frame(Widget):
if SYSTEM=="osx": if SYSTEM=="osx":
if visible: if visible:
self.frame.height = self.height self.frame.height = self.height
# Setting the height to 0 doesn't work on Linux, so we hack around it
if PLATFORM.startswith("linux"):
self.frame._gtk_inner_widget.set_visible(True)
else: else:
self.frame.height = 0 self.frame.height = 0
if PLATFORM.startswith("linux"):
self.frame._gtk_inner_widget.set_visible(False)
print "visible:",visible
class Scale(Widget): class Scale(Widget):
def __init__(self,min,val,max): def __init__(self,min,val,max):
@ -1402,6 +1409,9 @@ class Text (object):
+" text=\""+self.text+"\" color="+self.fill.rgb+" size="+str(self.font.size)\ +" text=\""+self.text+"\" color="+self.fill.rgb+" size="+str(self.font.size)\
+"pt\n" +"pt\n"
return retval return retval
def print_html(self):
retval = "var "+self.name+" = new Text();\n"+self.name+".text = \""+self.text+";\n"
return retval
class framewrapper (object): class framewrapper (object):