From 3a6635f5b36142412739ef5f76aa6bcab5ebc678 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Mon, 02 Feb 2009 18:26:02 +0000 Subject: rebase on TAPortfolio --- diff --git a/NEWS b/NEWS index ecc881b..72512d7 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +32 + +* rebase on TAPortfolio code + 31 * run and step diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py index afb1d7f..b4c889b 100644 --- a/TurtleArtActivity.py +++ b/TurtleArtActivity.py @@ -24,6 +24,7 @@ import talogo import pygtk pygtk.require('2.0') import gtk +import gobject import sugar from sugar.activity import activity @@ -35,21 +36,23 @@ from gettext import gettext as _ import locale import os.path import os +import tarfile +import sys +from taexportlogo import * class TurtleArtActivity(activity.Activity): + def __init__(self, handle): super(TurtleArtActivity,self).__init__(handle) - self.gamename = 'turtleart' -# self.set_title("TurtleArt...") - toolbox = activity.ActivityToolbox(self) self.set_toolbox(toolbox) + self.projectToolbar = ProjectToolbar(self) toolbox.add_toolbar( _('Project'), self.projectToolbar ) - toolbox.show() -# toolbox._activity_toolbar.keep.connect('clicked', self._keep_clicked_cb) # patch + toolbox.show() + toolbox.set_current_toolbar(1) canvas = gtk.EventBox() @@ -58,12 +61,16 @@ class TurtleArtActivity(activity.Activity): toolbox._activity_toolbar.title.select_region(0,0) tboxh = toolbox._activity_toolbar.size_request()[1] - version = os.environ['SUGAR_BUNDLE_VERSION'] + try: + version = os.environ['SUGAR_BUNDLE_VERSION'] + except: + version = "-unknown" lang = locale.getdefaultlocale()[0] if not lang: lang = 'en' lang = lang[0:2] - if not os.path.isdir(os.path.join(activity.get_bundle_path(),'images',lang)): + if not os.path.isdir(os.path.join(activity.get_bundle_path(), \ + 'images', lang)): lang = 'en' # test to see if lang or version has changed since last time @@ -72,26 +79,30 @@ class TurtleArtActivity(activity.Activity): versiondata = [] try: - FILE = open(os.path.join(activity.get_activity_root(),"data",filename),"r") + FILE = open(os.path.join(activity.get_activity_root(), "data", \ + filename), "r") if FILE.readline() == lang + version: - print "the version data hasn't changed" + pass else: - print "out with the old version data", - os.system("rm " + os.path.join(activity.get_activity_root(),"data",'*.png')) + print "out with the old, in with the new" + os.system("rm " + os.path.join(activity.get_activity_root(), \ + "data", '*.png')) except: print "writing new version data" + versiondata.append(lang + version) - FILE = open(os.path.join(activity.get_activity_root(),"data",filename),"w") + FILE = open(os.path.join(activity.get_activity_root(), "data", \ + filename), "w") FILE.writelines(versiondata) FILE.close() - self.tw = tawindow.twNew(canvas,activity.get_bundle_path(),lang,tboxh,self) + self.tw = tawindow.twNew1(canvas,activity.get_bundle_path(), \ + lang,tboxh,self) self.tw.activity = self self.tw.window.grab_focus() - self.tw.save_folder = os.path.join(os.environ['SUGAR_ACTIVITY_ROOT'],'data') - -# toolbox._activity_toolbar._update_title_sid = True -# toolbox._activity_toolbar.title.connect('focus-out-event', self.update_title_cb, toolbox) # patch + tawindow.twNew2(self.tw) + self.tw.save_folder=os.path.join(os.environ['SUGAR_ACTIVITY_ROOT'], \ + 'data') if self._jobject and self._jobject.file_path: self.read_file(self._jobject.file_path) @@ -106,7 +117,7 @@ class TurtleArtActivity(activity.Activity): def write_file(self, file_path): print "Writing file %s" % file_path self.metadata['mime_type'] = 'application/x-tar' - import tarfile,os,tempfile + import tempfile tar_fd = tarfile.open(file_path, 'w') pngfd, pngfile = tempfile.mkstemp(".png") tafd, tafile = tempfile.mkstemp(".ta") @@ -124,27 +135,33 @@ class TurtleArtActivity(activity.Activity): os.remove(tafile) def read_file(self, file_path): - # Better be a tar file. import tarfile,os,tempfile,shutil print "Reading file %s" % file_path - tar_fd = tarfile.open(file_path, 'r') - tmpdir = tempfile.mkdtemp() - - try: - # We'll get 'ta_code.ta' and 'ta_image.png' - tar_fd.extractall(tmpdir) - tawindow.load_files(self.tw, os.path.join(tmpdir, 'ta_code.ta'), os.path.join(tmpdir, 'ta_image.png')) - - finally: - shutil.rmtree(tmpdir) - tar_fd.close() + # might be a tar file + if file_path[-5:] == ".gtar": + tar_fd = tarfile.open(file_path, 'r') + tmpdir = tempfile.mkdtemp() + try: + # We'll get 'ta_code.ta' and 'ta_image.png' + tar_fd.extractall(tmpdir) + tawindow.load_files(self.tw, os.path.join(tmpdir, \ + 'ta_code.ta'), os.path.join(tmpdir, 'ta_image.png')) + finally: + shutil.rmtree(tmpdir) + tar_fd.close() + # or just a .ta file + elif file_path[-3:] == ".ta": + tawindow.load_files(self.tw, file_path, "") + # run the activity + tawindow.runbutton(self.tw, 0) def jobject_new_patch(self): oldj = self._jobject self._jobject = datastore.create() self._jobject.metadata['title'] = oldj.metadata['title'] - self._jobject.metadata['title_set_by_user'] = oldj.metadata['title_set_by_user'] + self._jobject.metadata['title_set_by_user'] = \ + oldj.metadata['title_set_by_user'] self._jobject.metadata['activity'] = self.get_service_name() self._jobject.metadata['activity_id'] = self.get_id() self._jobject.metadata['keep'] = '0' @@ -155,46 +172,178 @@ class TurtleArtActivity(activity.Activity): datastore.write(self._jobject, reply_handler=self._internal_jobject_create_cb, error_handler=self._internal_jobject_error_cb) + self._jobject.destroy() def clear_journal(self): - jobjects, total_count = datastore.find({'activity': 'org.laptop.TurtleArtActivity'}) + jobjects, total_count = datastore.find( \ + {'activity': 'org.sugarlab.TAPortfolioActivity'}) print 'found', total_count, 'entries' for jobject in jobjects[:-1]: print jobject.object_id datastore.delete(jobject.object_id) -class ProjectToolbar(gtk.Toolbar): - from taexport import * + + +class ProjectToolbar(gtk.Toolbar): def __init__(self, pc): gtk.Toolbar.__init__(self) self.activity = pc + # blocks button + self.blocks = ToolButton( "blocksoff" ) + self.blocks.set_tooltip(_('hide palette')) + self.blocks.props.sensitive = True + self.blocks.connect('clicked', self.do_blocks) + self.insert(self.blocks, -1) + self.blocks.show() + + # hide-show button + self.hideshow = ToolButton( "hideshowoff" ) + self.hideshow.set_tooltip(_('hide blocks')) + self.hideshow.props.sensitive = True + self.hideshow.connect('clicked', self.do_hideshow) + self.insert(self.hideshow, -1) + self.hideshow.show() + + separator = gtk.SeparatorToolItem() + separator.set_draw(True) + self.insert(separator, -1) + separator.show() + + # run button + self.runproject = ToolButton( "run-fastoff" ) + self.runproject.set_tooltip(_('run')) + self.runproject.props.sensitive = True + self.runproject.connect('clicked', self.do_run) + self.insert(self.runproject, -1) + self.runproject.show() + + # step button + self.stepproject = ToolButton( "run-slowoff" ) + self.stepproject.set_tooltip(_('step')) + self.stepproject.props.sensitive = True + self.stepproject.connect('clicked', self.do_step) + self.insert(self.stepproject, -1) + self.stepproject.show() + + # stop button + self.stop = ToolButton( "stopitoff" ) + self.stop.set_tooltip(_('stop turtle')) + self.stop.props.sensitive = True + self.stop.connect('clicked', self.do_stop) + self.insert(self.stop, -1) + self.stop.show() + + separator = gtk.SeparatorToolItem() + separator.set_draw(True) + self.insert(separator, -1) + separator.show() + + # eraser button + self.eraser = ToolButton( "eraseron" ) + self.eraser.set_tooltip(_('clean')) + self.eraser.props.sensitive = True + self.eraser.connect('clicked', self.do_eraser) + self.insert(self.eraser, -1) + self.eraser.show() + + separator = gtk.SeparatorToolItem() + separator.set_draw(True) + self.insert(separator, -1) + separator.show() + + # project open self.sampb = ToolButton( "stock-open" ) - self.sampb.set_tooltip(_('Samples')) + self.sampb.set_tooltip(_('sample portfolio templates')) self.sampb.props.sensitive = True self.sampb.connect('clicked', self.do_samples) self.insert(self.sampb, -1) self.sampb.show() - # UCB Logo save source button - self.savelogo = ToolButton( "UCB-save" ) - self.savelogo.set_tooltip(_('UCB Logo')) + separator = gtk.SeparatorToolItem() + separator.set_draw(True) + self.insert(separator, -1) + separator.show() + + # Berkeley Logo save source button + self.savelogo = ToolButton( "logo-saveoff" ) + self.savelogo.set_tooltip(_('save Logo')) self.savelogo.props.sensitive = True self.savelogo.connect('clicked', self.do_savelogo) self.insert(self.savelogo, -1) self.savelogo.show() + def do_blocks(self, button): + tawindow.hideshow_palette(self.activity.tw) + if self.activity.tw.palette == False: + self.blocks.set_icon("blockson") + self.blocks.set_tooltip(_('show palette')) + else: + self.blocks.set_icon("blocksoff") + self.blocks.set_tooltip(_('hide palette')) + + def do_hidepalette(self): + print "in do_hidepalette" + self.blocks.set_icon("blockson") + self.blocks.set_tooltip(_('show palette')) + + def do_run(self, button): + self.runproject.set_icon("run-faston") + self.stop.set_icon("stopiton") + tawindow.runbutton(self.activity.tw, 0) + gobject.timeout_add(1000,self.runproject.set_icon,"run-fastoff") + gobject.timeout_add(1000,self.stepproject.set_icon,"run-slowoff") + + def do_step(self, button): + self.stepproject.set_icon("run-slowon") + self.stop.set_icon("stopiton") + tawindow.runbutton(self.activity.tw, 3) + gobject.timeout_add(1000,self.stepproject.set_icon,"run-slowoff") + gobject.timeout_add(1000,self.runproject.set_icon,"run-fastoff") + + def do_stop(self, button): + self.stop.set_icon("stopitoff") + tawindow.stop_button(self.activity.tw) + self.stepproject.set_icon("run-slowoff") + self.runproject.set_icon("run-fastoff") + + def do_hideshow(self, button): + tawindow.hideshow_button(self.activity.tw) + if self.activity.tw.hide == True: # we just hid the blocks + self.hideshow.set_icon("hideshowon") + self.hideshow.set_tooltip(_('show blocks')) + else: + self.hideshow.set_icon("hideshowoff") + self.hideshow.set_tooltip(_('hide blocks')) + # update palette buttons too + if self.activity.tw.palette == False: + self.blocks.set_icon("blockson") + self.blocks.set_tooltip(_('show palette')) + else: + self.blocks.set_icon("blocksoff") + self.blocks.set_tooltip(_('hide palette')) + + def do_hide(self): + self.hideshow.set_icon("hideshowon") + self.hideshow.set_tooltip(_('show blocks')) + self.blocks.set_icon("blockson") + self.blocks.set_tooltip(_('show palette')) + + def do_eraser(self, button): + self.eraser.set_icon("eraseroff") + tawindow.eraser_button(self.activity.tw) + gobject.timeout_add(250,self.eraser.set_icon,"eraseron") + def do_samples(self, button): tawindow.load_file(self.activity.tw) -# self.activity.jobject_new_patch() def do_savelogo(self, button): # write logo code out to datastore - print "saving logo code" + self.savelogo.set_icon("logo-saveon") # grab code from stacks - logocode = self.save_logo(self.activity.tw) + logocode = save_logo(self,self.activity.tw) if len(logocode) == 0: return filename = "logosession.lg" @@ -202,14 +351,15 @@ class ProjectToolbar(gtk.Toolbar): # Create a datastore object file_dsobject = datastore.create() - # Write any metadata (here we specifically set the title of the file and - # specify that this is a plain text file). + # Write any metadata (here we specifically set the title of the file + # and specify that this is a plain text file). file_dsobject.metadata['title'] = filename file_dsobject.metadata['mime_type'] = 'text/plain' file_dsobject.metadata['icon-color'] = profile.get_color().to_string() #Write the actual file to the data directory of this activity's root. - file_path = os.path.join(self.activity.get_activity_root(), 'instance', filename) + file_path = os.path.join(self.activity.get_activity_root(), \ + 'instance', filename) f = open(file_path, 'w') try: f.write(logocode) @@ -220,4 +370,6 @@ class ProjectToolbar(gtk.Toolbar): file_dsobject.set_file_path(file_path) datastore.write(file_dsobject) + gobject.timeout_add(250,self.savelogo.set_icon, "logo-saveoff") return + diff --git a/activity/activity.info b/activity/activity.info index ada738a..b123109 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -1,6 +1,6 @@ [Activity] name = Turtle Art -activity_version = 31 +activity_version = 32 license = MIT service_name = org.laptop.TurtleArtActivity class = TurtleArtActivity.TurtleArtActivity diff --git a/icons/blocksoff.svg b/icons/blocksoff.svg new file mode 100644 index 0000000..8efee24 --- /dev/null +++ b/icons/blocksoff.svg @@ -0,0 +1,32 @@ + + + + + + + + X + + diff --git a/icons/blockson.svg b/icons/blockson.svg new file mode 100644 index 0000000..be6b729 --- /dev/null +++ b/icons/blockson.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + diff --git a/images/en/toolbar/eraseroff.svg b/icons/eraseroff.svg index 9ffbb5e..9ffbb5e 100644 --- a/images/en/toolbar/eraseroff.svg +++ b/icons/eraseroff.svg diff --git a/images/en/toolbar/eraseron.svg b/icons/eraseron.svg index dcb3ae3..dcb3ae3 100644 --- a/images/en/toolbar/eraseron.svg +++ b/icons/eraseron.svg diff --git a/images/en/toolbar/hideshowoff.svg b/icons/hideshowoff.svg index 19b49a3..19b49a3 100644 --- a/images/en/toolbar/hideshowoff.svg +++ b/icons/hideshowoff.svg diff --git a/icons/hideshowon.svg b/icons/hideshowon.svg new file mode 100644 index 0000000..b6c328d --- /dev/null +++ b/icons/hideshowon.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + diff --git a/icons/logo-saveoff.svg b/icons/logo-saveoff.svg new file mode 100644 index 0000000..f1ca4a7 --- /dev/null +++ b/icons/logo-saveoff.svg @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/icons/logo-saveon.svg b/icons/logo-saveon.svg new file mode 100644 index 0000000..e705778 --- /dev/null +++ b/icons/logo-saveon.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/icons/run-fastoff.svg b/icons/run-fastoff.svg new file mode 100644 index 0000000..52c01b1 --- /dev/null +++ b/icons/run-fastoff.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + diff --git a/icons/run-faston.svg b/icons/run-faston.svg new file mode 100644 index 0000000..7f435c6 --- /dev/null +++ b/icons/run-faston.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + diff --git a/images/es/toolbar/stepoff.svg b/icons/run-slowoff.svg index 1025dd4..72d4267 100644 --- a/images/es/toolbar/stepoff.svg +++ b/icons/run-slowoff.svg @@ -15,13 +15,13 @@ d="M 36.852226,15.69838 A 11.523279,10.799595 0 1 1 13.805668,15.69838 A 11.523279,10.799595 0 1 1 36.852226,15.69838 z" transform="matrix(2.1478261,0,0,2.2917526,-26.902174,-8.4768043)" id="path2387" - style="opacity:1;fill:#808080;fill-opacity:1;stroke:#808080;stroke-width:1.92812335;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.94117647" /> \ No newline at end of file + style="opacity:1;fill:#00d000;fill-opacity:1;stroke:#00d000;stroke-width:1.5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> diff --git a/icons/run-slowon.svg b/icons/run-slowon.svg new file mode 100644 index 0000000..a99c82e --- /dev/null +++ b/icons/run-slowon.svg @@ -0,0 +1,31 @@ + + + + + + \ No newline at end of file diff --git a/images/en/toolbar/stopitoff.svg b/icons/stopitoff.svg index 78117ec..78117ec 100644 --- a/images/en/toolbar/stopitoff.svg +++ b/icons/stopitoff.svg diff --git a/images/en/toolbar/stopiton.svg b/icons/stopiton.svg index af01208..af01208 100644 --- a/images/en/toolbar/stopiton.svg +++ b/icons/stopiton.svg diff --git a/images/en/blocks-.svg b/images/en/blocks-.svg new file mode 100644 index 0000000..7bd2cc0 --- /dev/null +++ b/images/en/blocks-.svg @@ -0,0 +1,58 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/images/en/maskstring.svg b/images/en/maskstring.svg index f3906a5..9b82a8d 100644 --- a/images/en/maskstring.svg +++ b/images/en/maskstring.svg @@ -3,66 +3,30 @@ - - - - - - - - - - - - + id="defs15" /> + + + + + - + style="fill:none;stroke:#ffff00;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" /> diff --git a/images/en/myblocks/box.svg b/images/en/myblocks/box.svg index 8eac855..ee6df5a 100644 --- a/images/en/myblocks/box.svg +++ b/images/en/myblocks/box.svg @@ -5,8 +5,8 @@ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" - width="140" - height="32" + width="128.25" + height="32.25" id="svg2"> @@ -58,14 +58,14 @@ xlink:href="#linearGradient3886" gradientUnits="userSpaceOnUse" /> + gradientTransform="translate(12.25,4.96875)" /> + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,5.4999997)" /> + + + + + - - - + diff --git a/images/en/myblocks/hat.svg b/images/en/myblocks/hat.svg index 683a89d..b06f53f 100644 --- a/images/en/myblocks/hat.svg +++ b/images/en/myblocks/hat.svg @@ -95,18 +95,117 @@ xlink:href="#linearGradient3166" gradientUnits="userSpaceOnUse" gradientTransform="translate(-15.5,16.96875)" /> + + + + + + + + + + + + + + + + + + + + + + + - - - + diff --git a/images/en/myblocks/hat1.svg b/images/en/myblocks/hat1.svg index 87efe49..917875f 100644 --- a/images/en/myblocks/hat1.svg +++ b/images/en/myblocks/hat1.svg @@ -45,6 +45,6 @@ stack1 +style="font-size:18px">action1 diff --git a/images/en/myblocks/hat2.svg b/images/en/myblocks/hat2.svg index 79288aa..279c696 100644 --- a/images/en/myblocks/hat2.svg +++ b/images/en/myblocks/hat2.svg @@ -45,6 +45,6 @@ stack2 +style="font-size:18px">action2 diff --git a/images/en/myblocks/myblocksgroup.svg b/images/en/myblocks/myblocksgroup.svg index 9712c96..ce9136f 100644 --- a/images/en/myblocks/myblocksgroup.svg +++ b/images/en/myblocks/myblocksgroup.svg @@ -9,640 +9,278 @@ height="500" id="svg2"> + id="defs92"> + id="linearGradient3239"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + x1="9.8133535" + y1="399.42288" + x2="67.875931" + y2="399.42288" + id="linearGradient3361" + xlink:href="#linearGradient3239" + gradientUnits="userSpaceOnUse" /> + x1="9.8133535" + y1="399.42288" + x2="67.875931" + y2="399.42288" + id="linearGradient3363" + xlink:href="#linearGradient3239" + gradientUnits="userSpaceOnUse" /> + x1="9.8133535" + y1="399.42288" + x2="67.875931" + y2="399.42288" + id="linearGradient3365" + xlink:href="#linearGradient3239" + gradientUnits="userSpaceOnUse" /> + x1="9.8133535" + y1="399.42288" + x2="67.875931" + y2="399.42288" + id="linearGradient3367" + xlink:href="#linearGradient3239" + gradientUnits="userSpaceOnUse" /> + x1="9.8133535" + y1="399.42288" + x2="67.875931" + y2="399.42288" + id="linearGradient3371" + xlink:href="#linearGradient3239" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-1.571244,4.74717)" /> + + + x1="64.812042" + y1="396.17004" + x2="134.81549" + y2="396.17004" + id="linearGradient3389" + xlink:href="#linearGradient3239" + gradientUnits="userSpaceOnUse" /> + x1="64.812042" + y1="396.17004" + x2="134.81549" + y2="396.17004" + id="linearGradient3393" + xlink:href="#linearGradient3239" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(5.210508,8)" /> + + + x1="81.979385" + y1="444.33197" + x2="130.9818" + y2="444.33197" + id="linearGradient3412" + xlink:href="#linearGradient3239" + gradientUnits="userSpaceOnUse" /> @@ -673,7 +311,7 @@ width="137.5" height="0.14" x="3.7153397" - y="-375.43195" + y="-383.43195" transform="scale(1,-1)" id="rect37" style="opacity:1;fill:#ffd000;fill-opacity:1;stroke:#fff080;stroke-width:1;stroke-opacity:1" /> @@ -701,141 +339,117 @@ style="font-size:20px">MyBlocks + style="fill:url(#linearGradient3253);fill-opacity:1;stroke:#c0a000;stroke-width:1;stroke-opacity:1" /> stack1 + style="font-size:11px">action1 + style="fill:url(#linearGradient3261);fill-opacity:1;stroke:#c0a000;stroke-width:1;stroke-opacity:1" /> stack1 + style="font-size:11px">action1 + style="fill:url(#linearGradient3269);fill-opacity:1;stroke:#c0a000;stroke-width:1;stroke-opacity:1" /> stack2 + style="font-size:11px">action2 + style="fill:url(#linearGradient3277);fill-opacity:1;stroke:#c0a000;stroke-width:1;stroke-opacity:1" /> stack2 + style="font-size:11px">action2 - - - - - - - - - - - - - - + + + + + style="fill:url(#linearGradient3301);fill-opacity:1;stroke:#c0a000;stroke-width:1;stroke-opacity:1" /> store in box1 + style="fill:url(#linearGradient3309);fill-opacity:1;stroke:#c0a000;stroke-width:1;stroke-opacity:1" /> box1 + style="fill:url(#linearGradient3317);fill-opacity:1;stroke:#c0a000;stroke-width:1;stroke-opacity:1" /> store in box2 + style="fill:url(#linearGradient3325);fill-opacity:1;stroke:#c0a000;stroke-width:1;stroke-opacity:1" /> box2 + + + - - - - - - - - - - - - - - - - - - - name - - - - - - - + transform="matrix(0.6667,0,0,0.6667,8.135112,390.2883)" + id="g159" + style="fill:#f0e000;fill-opacity:1"> - - push - - - + d="M 70,6 L 86.5,6 L 86.5,12 L 82.5,12 L 82.5,9 L 72,9" + id="path161" + style="fill:#f0e000;fill-opacity:1;stroke:#a08000;stroke-width:1.5;stroke-opacity:1" /> - - pop - + d="M 70,33.5 L 86.5,33.5 L 86.5,27.5 L 82.5,27.5 L 82.5,30.5 L 72,30.5" + id="path163" + style="fill:#f0e000;fill-opacity:1;stroke:#a08000;stroke-width:1.5;stroke-opacity:1" /> + + push + + + + pop + + + style="fill:url(#linearGradient3404);fill-opacity:1;stroke:#c0a000;stroke-width:1;stroke-opacity:1" /> @@ -1021,7 +582,7 @@ + style="fill:url(#linearGradient3412);fill-opacity:1;stroke:#c0a000;stroke-width:1;stroke-opacity:1" /> @@ -1044,4 +605,52 @@ style="font-size:11px">heap + + + + + + name + + + + + + start + diff --git a/images/en/myblocks/myblocksmask.svg b/images/en/myblocks/myblocksmask.svg index 9a393fe..90fbfb6 100644 --- a/images/en/myblocks/myblocksmask.svg +++ b/images/en/myblocks/myblocksmask.svg @@ -1,167 +1,183 @@ - + - + - + - - + + - + - + - + - - + + - - - + + + - - + + - - - - + - + - + - - - - + - + - - + + - + - + - - + + - - - + + + - - - + + + - - + + - - - - - - - - + + + + - - + + - + - + style="fill:#989898;fill-opacity:1;stroke:none;stroke-width:1;stroke-opacity:1" /> + + diff --git a/images/en/myblocks/stack.svg b/images/en/myblocks/stack.svg index c88e10c..1b4f24c 100644 --- a/images/en/myblocks/stack.svg +++ b/images/en/myblocks/stack.svg @@ -112,18 +112,135 @@ id="linearGradient2608" xlink:href="#linearGradient3166" gradientUnits="userSpaceOnUse" /> + + + + + + + + + + + + + + + + + + + + + + + + + - - - + diff --git a/images/en/myblocks/stack1.svg b/images/en/myblocks/stack1.svg index f3d31c0..6755ad9 100644 --- a/images/en/myblocks/stack1.svg +++ b/images/en/myblocks/stack1.svg @@ -29,29 +29,11 @@ - - - - - - stack1 + style="font-size:18px;">action1 diff --git a/images/en/myblocks/stack2.svg b/images/en/myblocks/stack2.svg index 3912ad6..04ac380 100644 --- a/images/en/myblocks/stack2.svg +++ b/images/en/myblocks/stack2.svg @@ -29,29 +29,11 @@ - - - - - - stack2 + style="font-size:18px;">action2 diff --git a/images/en/myblocks/start.svg b/images/en/myblocks/start.svg new file mode 100644 index 0000000..b444b08 --- /dev/null +++ b/images/en/myblocks/start.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + start + + diff --git a/images/en/myblocks/storeinbox.svg b/images/en/myblocks/storeinbox.svg index 3b0bacc..4feb166 100644 --- a/images/en/myblocks/storeinbox.svg +++ b/images/en/myblocks/storeinbox.svg @@ -131,6 +131,110 @@ style="stop-color:#ffff00;stop-opacity:1" offset="1" /> + + + + + + + + + + + + + + + + + + + + + + + - - - + diff --git a/images/en/myblocks/storeinbox1.svg b/images/en/myblocks/storeinbox1.svg index 2e7101c..8cc1674 100644 --- a/images/en/myblocks/storeinbox1.svg +++ b/images/en/myblocks/storeinbox1.svg @@ -38,24 +38,6 @@ - - - - - - - - - - - - - + height="21" + id="svg2"> + + id="linearGradient3166"> - - - + diff --git a/images/en/nomedia.svg b/images/en/nomedia.svg new file mode 100644 index 0000000..6eb6bb2 --- /dev/null +++ b/images/en/nomedia.svg @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + X + + + + ??? + + + + + + + + ! + + + + + + + + + + + + diff --git a/images/en/numbers/division2.svg b/images/en/numbers/division2.svg new file mode 100644 index 0000000..97aebe5 --- /dev/null +++ b/images/en/numbers/division2.svg @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + / + + diff --git a/images/en/numbers/identity.svg b/images/en/numbers/identity.svg new file mode 100644 index 0000000..02af675 --- /dev/null +++ b/images/en/numbers/identity.svg @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/images/en/numbers/identity2.svg b/images/en/numbers/identity2.svg new file mode 100644 index 0000000..bb9820b --- /dev/null +++ b/images/en/numbers/identity2.svg @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/images/en/numbers/minus2.svg b/images/en/numbers/minus2.svg new file mode 100644 index 0000000..1cdcc97 --- /dev/null +++ b/images/en/numbers/minus2.svg @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/en/numbers/numbersgroup.svg b/images/en/numbers/numbersgroup.svg index f5ef2ba..e36956b 100644 --- a/images/en/numbers/numbersgroup.svg +++ b/images/en/numbers/numbersgroup.svg @@ -1,472 +1,759 @@ - + - - - - - - - + + + + + + + + + + + - - - - - - - - + + - - - + - + + + - + + + + + + + + + + + - - - - + + - + - + - + - + - + - + - + - + - + - - + + + X - - - X + + + Numbers - - Numbers + + - + - + - + - + - + - + - + - + - + - - - + - - - - - - - × - - - / - - - mod - - - + + + + - - - + + + + - - - + random - - random + + + - - - + = - - = + + + - - + < - - < + + + - - - + > - - - > + + + + and - - - and + + + + or - - - or + + + + not - - - - - print - - - not + + + + + + print + + + number - - number + + + min - - min + + + max - + y="247" + id="tspan192" + style="font-size:10.5px">max + + + + + + + + + + + x + + + + + + + + / + + + + mod + + diff --git a/images/en/numbers/numbersmask.svg b/images/en/numbers/numbersmask.svg index 193e7a3..7fcc732 100644 --- a/images/en/numbers/numbersmask.svg +++ b/images/en/numbers/numbersmask.svg @@ -1,74 +1,1127 @@ + + id="svg2"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + y="30" + id="rect4" + style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:4;stroke-opacity:1" /> + y="0" + id="rect6" + style="opacity:1;fill:#080808;fill-opacity:1;stroke:none;stroke-width:1;stroke-opacity:1" /> + d="M 0,470 L 0,486 L 3,493 L 8,497 L 15,499 L 129,499 L 136,497 L 142,492 L 145,484 L 145,470 L 0,470 z" + id="path8" + style="fill:#080808;fill-opacity:1;stroke:none;stroke-width:1px;stroke-opacity:1" /> + d="M 122,151.5 L 100,151.5 L 98,153.5 L 96,154.5 L 95,157.5 L 95,159.5 L 90,159.5 L 90,157.5 L 86,157.5 L 86,170.5 L 90,170.5 L 90,168.5 L 95,168.5 L 95,172.5 L 96,174.5 L 99,175.5 L 122,175.5 L 122,169.5 L 119,169.5 L 119,171.5 L 113,171.5 L 113,156.5 L 119,156.5 L 119,158.5 L 122,158.5 L 122,151.5 z" + id="path22" + style="fill:#404040;fill-opacity:1;stroke:none;stroke-width:1;stroke-opacity:1" /> + d="M 126,230 L 21,230 L 20,231 L 18,232 L 17,234 L 17,239 L 14,239 L 14,238 L 11,238 L 12,247 L 14,247 L 14,245 L 17,245 L 17,249 L 18,250 L 20,250 L 130,251 L 130,247 L 135,247 L 135,238 L 130,238 L 130,233 L 129,232 L 127,230 L 126,230 L 126,230" + id="path24" + style="fill:#585858;fill-opacity:1;stroke:#484848;stroke-width:1;stroke-opacity:1" /> + d="M 132,323.5 L 14,323.5 L 11,324.5 L 6,326.5 L 4,329.5 L 3,331.5 L 2,332.5 L 2,333.5 L 3,335.5 L 6,337.5 L 9,338.5 L 11,339.5 L 14,340.5 L 132,340.5 L 137,339.5 L 140,337.5 L 143,335.5 L 144,333.5 L 144,332.5 L 144,329.5 L 141,327.5 L 138,325.5 L 135,324.5 L 132,323.5 z" + id="path26" + style="fill:#707070;fill-opacity:1;stroke:#606060;stroke-width:1;stroke-opacity:1" /> + d="M 132,296.5 L 14,296.5 L 11,297.5 L 6,299.5 L 4,301.5 L 3,303.5 L 2,304.5 L 2,306.5 L 3,307.5 L 6,309.5 L 9,311.5 L 11,312.5 L 14,313.5 L 132,313.5 L 137,311.5 L 140,310.5 L 143,308.5 L 144,306.5 L 144,304.5 L 144,302.5 L 141,299.5 L 138,298.5 L 135,297.5 L 132,296.5 z" + id="path28" + style="fill:#686868;fill-opacity:1;stroke:#585858;stroke-width:1;stroke-opacity:1" /> + d="M 132,268.5 L 14,268.5 L 11,269.5 L 6,271.5 L 4,274.5 L 3,276.5 L 2,277.5 L 2,278.5 L 3,280.5 L 6,282.5 L 9,283.5 L 11,284.5 L 14,285.5 L 132,285.5 L 137,284.5 L 140,282.5 L 143,280.5 L 144,278.5 L 144,277.5 L 144,274.5 L 141,272.5 L 138,270.5 L 135,269.5 L 132,268.5 z" + id="path30" + style="fill:#606060;fill-opacity:1;stroke:#505050;stroke-width:1;stroke-opacity:1" /> + d="M 10,357.5 L 70,357.5 L 70,359.5 L 65,360.5 L 61,361.5 L 58,363.5 L 54,366.5 L 53,368.5 L 52,371.5 L 52,374.5 L 54,377.5 L 56,379.5 L 60,381.5 L 63,383.5 L 67,384.5 L 70,385.5 L 70,387.5 L 10,387.5 L 10,385.5 L 14,384.5 L 19,382.5 L 23,381.5 L 25,379.5 L 27,376.5 L 28,374.5 L 28,371.5 L 28,369.5 L 27,367.5 L 25,365.5 L 22,363.5 L 19,361.5 L 15,360.5 L 10,359.5 L 10,357.5 z" + id="path32" + style="fill:#787878;fill-opacity:1;stroke:#686868;stroke-width:1;stroke-opacity:1" /> + d="M 79,356.5 L 140,356.5 L 140,359.5 L 134,359.5 L 130,361.5 L 127,362.5 L 124,365.5 L 122,368.5 L 121,371.5 L 122,373.5 L 123,377.5 L 126,379.5 L 129,381.5 L 132,382.5 L 136,383.5 L 140,384.5 L 140,386.5 L 79,386.5 L 79,384.5 L 84,383.5 L 88,382.5 L 92,380.5 L 95,378.5 L 96,376.5 L 97,373.5 L 97,371.5 L 97,369.5 L 96,367.5 L 94,364.5 L 92,362.5 L 88,360.5 L 84,359.5 L 79,359.5 L 79,356.5 z" + id="path34" + style="fill:#808080;fill-opacity:1;stroke:#707070;stroke-width:1;stroke-opacity:1" /> + d="M 100,396.5 L 80,396.5 L 71,396.5 L 63,398.5 L 56,400.5 L 51,402.5 L 48,405.5 L 47,408.5 L 46,410.5 L 47,412.5 L 48,415.5 L 50,417.5 L 54,419.5 L 60,421.5 L 65,423.5 L 72,424.5 L 80,425.5 L 100,425.5 L 100,423.5 L 96,422.5 L 92,421.5 C 91,420.5 92,421.5 89,419.5 L 86,417.5 L 83,414.5 L 82,410.5 L 84,406.5 L 87,403.5 L 92,400.5 L 96,399.5 L 100,398.5 L 100,396.5" + id="path36" + style="fill:#888888;fill-opacity:1;stroke:#787878;stroke-width:1;stroke-opacity:1" /> + d="M 91,439 L 102,439 L 102,443 L 99,443 L 99,441 L 92,441" + id="path38" + style="fill:#808080;fill-opacity:1;stroke:#808080;stroke-width:1;stroke-opacity:1" /> + d="M 91,457 L 102,457 L 102,453 L 99,453 L 99,455 L 92,455" + id="path40" + style="fill:#808080;fill-opacity:1;stroke:#808080;stroke-width:1;stroke-opacity:1" /> + d="M 76,438.5 C 87,438.5 87,438.5 87,438.5 L 91,441.5 L 93,445.5 L 93,458.5 L 91,461.5 L 87,464.5 L 76,464.5 L 76,464.5 L 76,466.5 L 62,466.5 L 62,464.5 L 51,464.5 L 47,461.5 L 45,458.5 L 45,445.5 L 47,441.5 L 51,438.5 L 62,438.5 L 62,442.5 L 76,442.5 L 76,438.5 z" + id="path42" + style="fill:#909090;fill-opacity:1;stroke:#808080;stroke-width:1;stroke-opacity:1" /> + d="M 37.643216,215.5 L 48.518216,215.5 L 48.518216,211 L 46.518216,211 L 46.518216,212.5 L 42.018216,212.5 L 42.018216,201 L 46.518216,201 L 46.518216,202.5 L 48.518216,202.5 L 48.518216,198.125 L 42.018216,198.125 L 41.77105,189.68559 L 25.768216,189.625 L 25.768216,187.625 L 23.018216,187.625 L 23.018216,197.875 L 25.768216,197.875 L 25.768216,195.875 L 28.018216,195.875 L 28.010174,215.44608 L 37.643216,215.5 z" + id="path3280" + style="fill:#484848;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + d="M 107.8072,187.625 L 118.6822,187.625 L 118.6822,192.125 L 116.6822,192.125 L 116.6822,190.625 L 112.1822,190.625 L 112.1822,202.125 L 116.6822,202.125 L 116.6822,200.625 L 118.6822,200.625 L 118.6822,205 L 118.84657,213.23958 L 98.182196,213.5 L 95.932196,213.5 L 95.932196,215.5 L 93.182196,215.5 L 93.182196,205.25 L 95.932196,205.25 L 95.932196,207.25 L 98.182196,207.25 L 98.295328,187.61834 L 107.8072,187.625 z" + id="path3282" + style="fill:#505050;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + d="M 27.006062,62.998163 L 47.506062,62.998163 L 47.506062,67.498163 L 45.506062,67.498163 L 45.506062,65.998163 L 41.006062,65.998163 L 41.006062,77.498163 L 45.506062,77.498163 L 45.506062,75.998163 L 47.506062,75.998163 L 47.506062,83.998163 L 45.506062,83.998163 L 45.506062,82.498163 L 41.006062,82.498163 L 41.006062,94.102668 L 45.506062,94.102668 L 45.506062,92.498163 L 47.506062,92.498163 L 47.506062,97.498168 L 27.006062,97.498168 L 27.006062,83.248163 L 24.756062,83.248163 L 24.756062,85.248163 L 22.006062,85.248163 L 22.006062,74.998163 L 24.756062,74.998163 L 24.756062,76.998163 L 27.006062,76.998163 L 27.006062,62.998163 z" + id="path3288" + style="fill:#181818;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + d="M 27.006062,104.49908 L 47.506062,104.49908 L 47.506062,108.99908 L 45.506062,108.99908 L 45.506062,107.49908 L 41.006062,107.49908 L 41.006062,118.99908 L 45.506062,118.99908 L 45.506062,117.49908 L 47.506062,117.49908 L 47.506062,125.49908 L 45.506062,125.49908 L 45.506062,123.99908 L 41.006062,123.99908 L 41.006062,135.60358 L 45.506062,135.60358 L 45.506062,133.99908 L 47.506062,133.99908 L 47.506062,138.99908 L 27.006062,138.99908 L 27.006062,124.74908 L 24.756062,124.74908 L 24.756062,126.74908 L 22.006062,126.74908 L 22.006062,116.49908 L 24.756062,116.49908 L 24.756062,118.49908 L 27.006062,118.49908 L 27.006062,104.49908 z" + id="path3290" + style="fill:#282828;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + d="M 92.357542,62.998163 L 112.98254,62.998163 L 112.98254,67.498163 L 110.85754,67.498163 L 110.85754,65.998163 L 106.35754,65.998163 L 106.35754,77.498163 L 110.85754,77.498163 L 110.85754,75.998163 L 112.98254,75.998163 L 112.98254,79.998163 L 122.48254,79.998163 L 122.48254,83.998163 L 120.48254,83.998163 L 120.48254,82.498163 L 115.98254,82.498163 L 115.98254,94.102668 L 120.48254,94.102668 L 120.48254,92.498163 L 122.48254,92.498163 L 122.48254,97.498168 L 92.357542,97.498168 L 92.357542,83.248163 L 90.107542,83.248163 L 90.107542,85.248163 L 87.357542,85.248163 L 87.357542,74.998163 L 90.107542,74.998163 L 90.107542,76.998163 L 92.357542,76.998163 L 92.357542,62.998163 z" + id="path3292" + style="fill:#202020;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + + diff --git a/images/en/numbers/plus.svg b/images/en/numbers/plus.svg index f271826..ff30535 100644 --- a/images/en/numbers/plus.svg +++ b/images/en/numbers/plus.svg @@ -29,15 +29,6 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/en/numbers/print.svg b/images/en/numbers/print.svg index 258d503..ad0eebb 100644 --- a/images/en/numbers/print.svg +++ b/images/en/numbers/print.svg @@ -34,24 +34,6 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + + x + + diff --git a/images/en/numbers/remainder.svg b/images/en/numbers/remainder.svg index d7efdf9..71e8813 100644 --- a/images/en/numbers/remainder.svg +++ b/images/en/numbers/remainder.svg @@ -30,15 +30,6 @@ - - - + + + + + + + + + + + + + + + + + + + + mod + + diff --git a/images/en/palette/flowoff.svg b/images/en/palette/flowoff.svg index a587c0f..e372e37 100644 --- a/images/en/palette/flowoff.svg +++ b/images/en/palette/flowoff.svg @@ -1,106 +1,38 @@ - - - - image/svg+xml - - - - + width="43.5" + height="56.5" + id="svg2"> - - - + id="defs5" /> - - - - + style="fill:#e0e0e0;fill-opacity:1;stroke:#a0a0a0;stroke-width:1.5;stroke-dasharray:none;stroke-opacity:1" /> + + + + + + diff --git a/images/en/palette/flowon.svg b/images/en/palette/flowon.svg index 1402413..a6033eb 100644 --- a/images/en/palette/flowon.svg +++ b/images/en/palette/flowon.svg @@ -1,106 +1,37 @@ - - - - image/svg+xml - - - - + width="43.5" + height="56.5" + id="svg2"> - - - + id="defs5" /> - - - - + style="fill:#ffe000;fill-opacity:1;stroke:#a06400;stroke-width:1.5;stroke-dasharray:none;stroke-opacity:1" /> + + + + + + diff --git a/images/en/palette/myblocksoff.svg b/images/en/palette/myblocksoff.svg index ab1d831..ce85379 100644 --- a/images/en/palette/myblocksoff.svg +++ b/images/en/palette/myblocksoff.svg @@ -1,126 +1,103 @@ - - - - image/svg+xml - - - - + width="43.5" + height="56.5" + id="svg2"> - + + + xlink:href="#linearGradient3166" + gradientUnits="userSpaceOnUse" /> + style="stop-color:#ffffff;stop-opacity:1" + offset="0" /> + style="stop-color:#ffff00;stop-opacity:1" + offset="1" /> - + + id="linearGradient2561" + xlink:href="#linearGradient3166" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.3333,0,0,0.3333,8.962951,22.783517)" /> + + y2="22" + id="linearGradient2463" + xlink:href="#linearGradient3166" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.3333,0,0,0.3333,27.031478,45.064925)" /> - + style="fill:#e0e0e0;fill-opacity:1;stroke:#a0a0a0;stroke-width:1.5;stroke-dasharray:none;stroke-opacity:1" /> + transform="translate(-17.113578,-17.711929)" + id="g2457"> + style="fill:url(#linearGradient2461);fill-opacity:1;stroke:#c0a000;stroke-width:0.66659999;stroke-opacity:1" /> + style="fill:url(#linearGradient2463);fill-opacity:1;stroke:#c0a000;stroke-width:0.66659999;stroke-opacity:1" /> diff --git a/images/en/palette/myblockson.svg b/images/en/palette/myblockson.svg index 315f5c1..4407dd4 100644 --- a/images/en/palette/myblockson.svg +++ b/images/en/palette/myblockson.svg @@ -1,145 +1,99 @@ - - - - image/svg+xml - - - - + width="43.5" + height="56.5" + id="svg2"> - + xlink:href="#linearGradient3166" + gradientUnits="userSpaceOnUse" /> + style="stop-color:#ffffff;stop-opacity:1" + offset="0" /> + style="stop-color:#ffff00;stop-opacity:1" + offset="1" /> - + - + + y2="22" + id="linearGradient2569" + xlink:href="#linearGradient3166" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.3333,0,0,0.3333,8.962951,22.783517)" /> + + y2="22" + id="linearGradient2431" + xlink:href="#linearGradient3166" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.3333,0,0,0.3333,9.4179005,14.481803)" /> - - - - - + style="fill:#ffe000;fill-opacity:1;stroke:#a06400;stroke-width:1.5;stroke-dasharray:none;stroke-opacity:1" /> + + diff --git a/images/en/palette/numbersoff.svg b/images/en/palette/numbersoff.svg index 4d7234c..9fcd454 100644 --- a/images/en/palette/numbersoff.svg +++ b/images/en/palette/numbersoff.svg @@ -1,90 +1,41 @@ - - - - image/svg+xml - - - - + width="43.5" + height="56.5" + id="svg2"> - - - + id="defs5" /> + style="fill:#e0e0e0;fill-opacity:1;stroke:#a0a0a0;stroke-width:1.5;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#a000a0;fill-opacity:1"> 123 + style="font-size:18px;fill:#a000a0;fill-opacity:1">123 +–= + style="font-size:18px;fill:#a000a0;fill-opacity:1">+–= diff --git a/images/en/palette/numberson.svg b/images/en/palette/numberson.svg index 2f83bd8..9f5a033 100644 --- a/images/en/palette/numberson.svg +++ b/images/en/palette/numberson.svg @@ -1,90 +1,40 @@ - - - - image/svg+xml - - - - + width="43.5" + height="56.5" + id="svg2"> - - - + id="defs5" /> + style="fill:#ffe000;fill-opacity:1;stroke:#a06400;stroke-width:1.5;stroke-dasharray:none;stroke-opacity:1" /> + transform="translate(0.25,-0.9240561)" + id="g2392"> 123 + style="font-size:18px;fill:#a000a0;fill-opacity:1">123 +–= + style="font-size:18px;fill:#a000a0;fill-opacity:1">+–= diff --git a/images/en/palette/penoff.svg b/images/en/palette/penoff.svg index e41874e..6f5494b 100644 --- a/images/en/palette/penoff.svg +++ b/images/en/palette/penoff.svg @@ -1,110 +1,52 @@ - - - - image/svg+xml - - - - + width="43.5" + height="56.5" + id="svg2"> - - - - + id="defs5" /> - - - - - - - - + style="fill:#e0e0e0;fill-opacity:1;stroke:#a0a0a0;stroke-width:1.5;stroke-dasharray:none;stroke-opacity:1" /> + + + + + + + + + + diff --git a/images/en/palette/penon.svg b/images/en/palette/penon.svg index bcaffbf..552f22d 100644 --- a/images/en/palette/penon.svg +++ b/images/en/palette/penon.svg @@ -1,110 +1,48 @@ - - - - image/svg+xml - - - - + width="43.5" + height="56.5" + id="svg2"> - - - - + id="defs5" /> + style="fill:#ffe000;fill-opacity:1;stroke:#a06400;stroke-width:1.5;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#0080ff;stroke-width:3;stroke-linecap:round;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#e0e0e0;fill-opacity:1;stroke:#e0e0e0;stroke-width:1px;stroke-opacity:1" /> + style="fill:none;stroke:#0060ff;stroke-width:2;stroke-linecap:round;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#a0a0ff;fill-opacity:1;stroke:#a0a0ff;stroke-width:1px;stroke-opacity:1" /> + style="fill:#8080ff;fill-opacity:1;stroke:#8080ff;stroke-width:1px;stroke-opacity:1" /> + d="M 10.503173,34.596447 L 12.152284,36.245558 L 30.435914,18.463832 L 28.930203,16.67132 L 10.503173,34.596447 z" + id="path3251" + style="fill:#c4c4ff;fill-opacity:1;stroke:#c4c4ff;stroke-width:1px;stroke-opacity:1" /> + style="fill:#e0a040;fill-opacity:1;stroke:#e0a040;stroke-width:1px;stroke-opacity:1" /> + style="fill:#e0e0e0;fill-opacity:1;stroke:#c4c4c4;stroke-width:1px;stroke-opacity:1" /> diff --git a/images/en/palette/sensorsoff.svg b/images/en/palette/sensorsoff.svg index 798ef1c..3356434 100644 --- a/images/en/palette/sensorsoff.svg +++ b/images/en/palette/sensorsoff.svg @@ -1,71 +1,37 @@ - - - - image/svg+xml - - - - - + id="svg2"> - - + id="defs4" /> + + transform="translate(46.111336,0.514676)" + id="g3247" + style="stroke:#800000;stroke-opacity:1"> + d="M -36.1417,31.566802 L -36.027328,36.827935 L -24.590081,43.118421 L -24.361336,29.62247" + id="path2463" + style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#800000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + d="M -24.132592,29.736843 L -24.075405,43.118421 L -12.352227,35.569838 L -12.352227,30.880566 L -18.299595,34.426114" + id="path2465" + style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#800000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + + diff --git a/images/en/palette/sensorson.svg b/images/en/palette/sensorson.svg index e155baf..196654a 100644 --- a/images/en/palette/sensorson.svg +++ b/images/en/palette/sensorson.svg @@ -1,71 +1,37 @@ - - - - image/svg+xml - - - - - + id="svg2"> - - + id="defs4" /> + + transform="translate(46.111336,0.514676)" + id="g3247" + style="stroke:#800000;stroke-opacity:1"> + d="M -36.1417,31.566802 L -36.027328,36.827935 L -24.590081,43.118421 L -24.361336,29.62247" + id="path2463" + style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#800000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + d="M -24.132592,29.736843 L -24.075405,43.118421 L -12.352227,35.569838 L -12.352227,30.880566 L -18.299595,34.426114" + id="path2465" + style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#800000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + + diff --git a/images/en/palette/templatesoff.svg b/images/en/palette/templatesoff.svg new file mode 100644 index 0000000..e0ca78e --- /dev/null +++ b/images/en/palette/templatesoff.svg @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/en/palette/templateson.svg b/images/en/palette/templateson.svg new file mode 100644 index 0000000..55a1c9a --- /dev/null +++ b/images/en/palette/templateson.svg @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/en/palette/turtleoff.svg b/images/en/palette/turtleoff.svg index 0c77cc9..0c507c7 100644 --- a/images/en/palette/turtleoff.svg +++ b/images/en/palette/turtleoff.svg @@ -1,103 +1,30 @@ - - - - image/svg+xml - - - - + width="43.5" + height="56.5" + id="svg2"> - - - - - + id="defs5" /> + style="fill:#e0e0e0;fill-opacity:1;stroke:#808080;stroke-width:1.5;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#008000;fill-opacity:1;stroke:#008000;stroke-opacity:1" /> + style="fill:#00a000;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-opacity:1" /> + style="fill:#00a000;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-opacity:1" /> diff --git a/images/en/palette/turtleon.svg b/images/en/palette/turtleon.svg index 1991f5a..8bb5fb6 100644 --- a/images/en/palette/turtleon.svg +++ b/images/en/palette/turtleon.svg @@ -1,32 +1,43 @@ + + version="1.0" + width="43.5" + height="56.5" + id="svg2"> + + d="M 0.75,0.75 L 34.618627,0.75 C 34.618627,0.75 38.364227,1.9821101 39.669608,2.995098 C 40.856507,3.9161424 42.75,6.9480392 42.75,6.9480392 L 42.75,49.222549 C 42.75,49.222549 40.914623,52.48677 40.108824,53.285295 C 38.685367,54.6959 34.838235,55.75 34.838235,55.75 L 0.75,55.75 L 0.75,0.75 z" + id="path4" + style="fill:#ffe000;fill-opacity:1;stroke:#a06400;stroke-width:1.5;stroke-dasharray:none;stroke-opacity:1" /> + transform="translate(-7.944119,2.10283)" + id="g6"> + d="M 20.5,42 C 21.875591,41.187419 23.324128,40.131694 24,40 C 24.675872,39.868306 24.579078,40.660641 26,41.5 C 28.871423,43.196191 31.128577,43.196191 34,41.5 C 35.420922,40.660641 35.324128,39.868306 36,40 C 36.675872,40.131695 38.12441,41.187419 39.5,42 C 41.097361,42.943585 45.505636,43 46.5,43 C 47.862975,43 46.110123,41.182602 43.5,39 L 39.5,36 L 41.5,34 C 43.552001,30.398605 44.059678,28.270677 42.5,25 L 40.5,22.5 L 46,18.5 C 48.053201,16.852866 47.33499,14.042026 47,13.5 C 46.830328,13.225464 45.426642,13.185188 44.5,13.5 C 43.573358,13.814813 43.12376,14.484714 42.324973,15.25 C 39.61284,17.848388 40.886787,18.640024 37.081726,17.5 C 32.686548,16.183173 31.958771,15.10832 34.713812,12.064035 C 36.256507,10.359375 36.010696,8.923122 34.323529,7.0588235 C 32.022396,4.5161006 28.330545,4.3984536 26.029412,6.9411765 C 24.342245,8.805475 23.743493,10.477022 25.286188,12.181682 C 28.041229,15.225967 27.078158,16.183173 22.68298,17.5 C 18.891138,18.636063 19.911225,17.775269 17.275412,15.25 C 16.506393,14.513234 16.326683,13.803223 15.5,13.5 C 14.673317,13.196776 13.199661,13.300339 13,13.5 C 12.60068,13.89932 11.918971,16.752871 14,18.5 L 19.5,22.5 L 17.5,25 C 15.934588,28.282703 16.446238,30.395513 18.5,34 L 20.5,36 L 16.5,39 C 13.889877,41.182602 12.137025,43 13.5,43 C 14.494364,43 18.902639,42.943585 20.5,42 z" + id="path8" + style="fill:#008000;fill-opacity:1;stroke:#008000;stroke-opacity:1" /> + d="M 35.933332,10.6 C 35.933332,12.220035 34.545415,13.533333 32.833332,13.533333 C 31.121249,13.533333 29.733332,12.220035 29.733332,10.6 C 29.733332,8.9799646 31.121249,7.6666665 32.833332,7.6666665 C 34.545415,7.6666665 35.933332,8.9799646 35.933332,10.6 L 35.933332,10.6 z" + transform="matrix(0.9687388,0,0,1.0237808,-1.8069228,-0.602077)" + id="path10" + style="opacity:1;fill:#00a000;fill-opacity:1;stroke:#00a000;stroke-width:1.5;stroke-opacity:1" /> + d="M 28.6,8.333333 C 28.6,9.1433508 28.047818,9.7999999 27.366667,9.7999999 C 26.685515,9.7999999 26.133333,9.1433508 26.133333,8.333333 C 26.133333,7.5233152 26.685515,6.8666661 27.366667,6.8666661 C 28.047818,6.8666661 28.6,7.5233152 28.6,8.333333 z" + transform="matrix(1.0410748,0,0,0.8754493,4.5092528,0.7045893)" + id="path12" + style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-opacity:1" /> + d="M 28.6,8.333333 C 28.6,9.1433508 28.047818,9.7999999 27.366667,9.7999999 C 26.685515,9.7999999 26.133333,9.1433508 26.133333,8.333333 C 26.133333,7.5233152 26.685515,6.8666661 27.366667,6.8666661 C 28.047818,6.8666661 28.6,7.5233152 28.6,8.333333 z" + transform="matrix(1.0410748,0,0,0.8754493,-1.4907471,0.7045893)" + id="path14" + style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-opacity:1" /> + d="M 30.000018,17.434772 C 32.533265,17.466135 36.375857,19.030117 38.250018,20.734772 C 40.267187,22.569502 40.227344,25.717122 40.450018,28.434772 C 40.659101,30.986552 40.208339,33.446565 38.800018,35.584772 C 37.70354,37.249516 36.755682,38.040252 34.950018,38.884772 C 33.924157,39.364573 31.127256,40.974015 30.000018,40.864772 C 28.241122,40.694312 26.528528,39.852644 25.050018,38.884772 C 23.577823,37.921034 22.04357,37.128976 21.200018,35.584772 C 20.087184,33.547623 19.291665,30.741637 19.550018,28.434772 C 19.851198,25.745495 19.738642,22.5451 21.750018,20.734772 C 23.35027,19.294472 27.847215,17.408119 30.000018,17.434772 z" + id="path16" + style="fill:none;stroke:#008000;stroke-width:3;stroke-opacity:1" /> diff --git a/images/en/pen/fillscreen.svg b/images/en/pen/fillscreen.svg index 5148764..0055479 100644 --- a/images/en/pen/fillscreen.svg +++ b/images/en/pen/fillscreen.svg @@ -41,24 +41,6 @@ - - - - - - - - - - - - - + - - + + - - + - - + + - + - + - + - + - + - + - + - + - + - + - + - - - + + + + + + + + - + - + - + - + - + - + - - - + + + X - - X + + + Pen - - - - Pen + + + + pu - - - - pu + + + + pd - - - - - - pd + + + + + + set - - - set + + + pensize - - - - - - pensize + + + + + + set - - - set + + + color - - - - - - color + + + + + + set - - - set + + + shade - - - - - - - - shade + + + + + + + + fill - - - fill + + + screen - - - screen + + + color - - - color + + + shade - - - - shade + + + + pensize - - - - pensize + + + + color - - - - color + + + + shade - - + y="461.96579" + id="tspan143" + style="font-size:10.5px">shade + + + + + + set + + + text + + + color + + diff --git a/images/en/pen/penmask.svg b/images/en/pen/penmask.svg index 70ec593..a050e75 100644 --- a/images/en/pen/penmask.svg +++ b/images/en/pen/penmask.svg @@ -1,79 +1,118 @@ + + height="500" + id="svg3575"> + + y="0" + id="rect3577" + style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:4;stroke-opacity:1" /> + y="0" + id="rect3579" + style="opacity:1;fill:#080808;fill-opacity:1;stroke:none;stroke-width:1;stroke-opacity:1" /> + d="M 0.5,470.5 L 0.5,486.5 L 3.5,493.5 L 8.5,497.5 L 15,500 L 129,500 L 136,497.5 L 142,492.5 L 145,484.5 L 145,470.5 L 0.5,470.5 z" + id="path3581" + style="fill:#080808;fill-opacity:1;stroke:none;stroke-width:1px;stroke-opacity:1" /> + d="M 50,33 C 61,33 61,33 61,33 L 64,36 L 67,40 L 67,53 L 64,56 L 61,59 L 49,59 L 49,59 L 49,61 L 36,61 L 36,59 L 25,59 L 21,56 L 19,53 L 19,40 L 21,36 L 25,33 L 35,33 L 35,37 L 50,37 L 50,33 z" + id="path3583" + style="fill:#101010;fill-opacity:1;stroke:#101010;stroke-width:1;stroke-opacity:1" /> + d="M 109,33 C 120,33 120,33 120,33 L 123,36 L 126,40 L 126,53 L 123,56 L 120,59 L 108,59 L 108,59 L 108,61 L 95,61 L 95,59 L 84,59 L 80,56 L 78,53 L 78,40 L 80,36 L 84,33 L 94,33 L 94,37 L 109,37 L 109,33 z" + id="path3585" + style="fill:#181818;fill-opacity:1;stroke:#181818;stroke-width:1;stroke-opacity:1" /> + d="M 90,84 L 101,84 L 101,88 L 98,88 L 98,86 L 91,86" + id="path3587" + style="fill:#202020;fill-opacity:1;stroke:#202020;stroke-width:1;stroke-opacity:1" /> + d="M 90,102 L 101,102 L 101,98 L 98,98 L 98,100 L 91,100" + id="path3589" + style="fill:#202020;fill-opacity:1;stroke:#202020;stroke-width:1;stroke-opacity:1" /> + d="M 75,75 C 86,75 86,75 86,75 L 89,77 L 92,81 L 92,104 L 89,108 L 86,111 L 74,111 L 74,111 L 74,113 L 61,113 L 61,111 L 50,111 L 46,108 L 44,104 L 44,81 L 46,77 L 50,75 L 60,75 L 60,78 L 75,78 L 75,75 z" + id="path3591" + style="fill:#202020;fill-opacity:1;stroke:#202020;stroke-width:1;stroke-opacity:1" /> + d="M 90,136 L 101,136 L 101,140 L 98,140 L 98,138 L 91,138" + id="path3593" + style="fill:#282828;fill-opacity:1;stroke:#282828;stroke-width:1;stroke-opacity:1" /> + d="M 90,154 L 101,154 L 101,150 L 98,150 L 98,152 L 91,152" + id="path3595" + style="fill:#282828;fill-opacity:1;stroke:#282828;stroke-width:1;stroke-opacity:1" /> + d="M 75,127 C 86,127 86,127 86,127 L 89,129 L 92,133 L 92,156 L 89,160 L 86,163 L 74,163 L 74,163 L 74,165 L 61,165 L 61,163 L 50,163 L 46,160 L 44,156 L 44,133 L 46,129 L 50,127 L 60,127 L 60,130 L 75,130 L 75,127 z" + id="path3597" + style="fill:#282828;fill-opacity:1;stroke:#282828;stroke-width:1;stroke-opacity:1" /> + d="M 90,188 L 101,188 L 101,192 L 98,192 L 98,190 L 91,190" + id="path3599" + style="fill:#303030;fill-opacity:1;stroke:#303030;stroke-width:1;stroke-opacity:1" /> + d="M 90,206 L 101,206 L 101,202 L 98,202 L 98,204 L 91,204" + id="path3601" + style="fill:#303030;fill-opacity:1;stroke:#303030;stroke-width:1;stroke-opacity:1" /> + d="M 75,179 C 86,179 86,179 86,179 L 89,182 L 92,186 L 92,208 L 89,212 L 86,215 L 74,215 L 74,215 L 74,218 L 61,218 L 61,215 L 50,215 L 46,212 L 44,208 L 44,186 L 46,182 L 50,179 L 60,179 L 60,182 L 75,182 L 75,179 z" + id="path3603" + style="fill:#303030;fill-opacity:1;stroke:#303030;stroke-width:1;stroke-opacity:1" /> + d="M 90,259 L 101,259 L 101,263 L 98,263 L 98,261 L 91,261" + id="path3605" + style="fill:#383838;fill-opacity:1;stroke:#383838;stroke-width:1;stroke-opacity:1" /> + d="M 90,277 L 101,277 L 101,273 L 98,273 L 98,275 L 91,275" + id="path3607" + style="fill:#383838;fill-opacity:1;stroke:#383838;stroke-width:1;stroke-opacity:1" /> + d="M 90,234 L 101,234 L 101,238 L 98,238 L 98,236 L 91,236" + id="path3609" + style="fill:#383838;fill-opacity:1;stroke:#383838;stroke-width:1;stroke-opacity:1" /> + d="M 90,253 L 101,253 L 101,249 L 98,249 L 98,251 L 91,251" + id="path3611" + style="fill:#383838;fill-opacity:1;stroke:#383838;stroke-width:1;stroke-opacity:1" /> + d="M 75,231 C 86,231 86,231 86,231 L 89,234 L 92,238 L 92,275 L 89,278 L 86,281 L 74,281 L 74,281 L 74,284 L 61,284 L 61,281 L 50,281 L 46,278 L 44,275 L 44,238 L 46,234 L 50,231 L 60,231 L 60,234 L 75,234 L 75,231 z" + id="path3613" + style="fill:#383838;fill-opacity:1;stroke:#383838;stroke-width:1;stroke-opacity:1" /> + d="M 38,450.5 L 41,450.5 L 41,452.5 L 46,452.5 L 46,450.5 L 107,450.5 L 107,463.5 L 46,463.5 L 46,460.5 L 41,460.5 L 41,463.5 L 38,463.5 L 38,450.5 z" + id="path3615" + style="fill:#585858;fill-opacity:1;stroke:#585858;stroke-width:1;stroke-opacity:1" /> + d="M 38,400.5 L 41,400.5 L 41,402.5 L 46,402.5 L 46,400.5 L 107,400.5 L 107,413.5 L 46,413.5 L 46,410.5 L 41,410.5 L 41,413.5 L 38,413.5 L 38,400.5 z" + id="path3617" + style="fill:#484848;fill-opacity:1;stroke:#484848;stroke-width:1;stroke-opacity:1" /> + d="M 38,425.5 L 41,425.5 L 41,427.5 L 46,427.5 L 46,425.5 L 107,425.5 L 107,438.5 L 46,438.5 L 46,435.5 L 41,435.5 L 41,438.5 L 38,438.5 L 38,425.5 z" + id="path3619" + style="fill:#505050;fill-opacity:1;stroke:#505050;stroke-width:1;stroke-opacity:1" /> + + + diff --git a/images/en/pen/penup.svg b/images/en/pen/penup.svg index 754b524..8620a83 100644 --- a/images/en/pen/penup.svg +++ b/images/en/pen/penup.svg @@ -29,24 +29,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + set + + + text + + + color + + diff --git a/images/en/sensors/sensorsgroup.svg b/images/en/sensors/sensorsgroup.svg index abad056..d06ac17 100644 --- a/images/en/sensors/sensorsgroup.svg +++ b/images/en/sensors/sensorsgroup.svg @@ -1,173 +1,150 @@ - + - - + + - - + - + style="stop-color:#ff0000;stop-opacity:1" + offset="1" /> + - + - + - + - - - + + + - + - + - + - - + + - X - - X + + + Sensors - + id="tspan30" + style="font-size:20px">Sensors + + id="path100" + style="fill:url(#linearGradient2508);fill-opacity:1;stroke:#c00000;stroke-width:1;stroke-opacity:1" /> + id="text102" + style="font-size:12px;text-align:center;text-anchor:middle;font-family:Bitstream Vera Sans"> pitch - - voltage - - + id="path2488" + style="fill:url(#linearGradient2494);fill-opacity:1;stroke:#c00000;stroke-width:1;stroke-opacity:1" /> + id="text2490" + style="font-size:12px;text-align:center;text-anchor:middle;font-family:Bitstream Vera Sans"> volume - - - resistance - - + diff --git a/images/en/sensors/sensorsgroupxo.svg b/images/en/sensors/sensorsgroupxo.svg new file mode 100644 index 0000000..abad056 --- /dev/null +++ b/images/en/sensors/sensorsgroupxo.svg @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + X + + Sensors + + + + pitch + + + + voltage + + + + volume + + + + resistance + + diff --git a/images/en/sensors/sensorsmask.svg b/images/en/sensors/sensorsmask.svg index 2adecbc..93bd513 100644 --- a/images/en/sensors/sensorsmask.svg +++ b/images/en/sensors/sensorsmask.svg @@ -1,38 +1,38 @@ + + id="svg2"> + + y="0" + id="rect4" + style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:4;stroke-opacity:1" /> + y="0" + id="rect6" + style="opacity:1;fill:#080808;fill-opacity:1;stroke:none;stroke-width:1;stroke-opacity:1" /> + id="path2488" + style="fill:#101010;fill-opacity:1;stroke:#101010;stroke-width:1;stroke-opacity:1" /> + id="path100" + style="fill:#181818;fill-opacity:1;stroke:#181818;stroke-width:1;stroke-opacity:1" /> - - + d="M 0.5,374.5 L 0.5,390.5 L 3.5,397.5 L 8.5,401.5 L 15,404 L 129,404 L 136,401.5 L 142,396.5 L 145,388.5 L 145,374.5 L 0.5,374.5 z" + id="path12" + style="fill:#080808;fill-opacity:1;stroke:none;stroke-width:1px;stroke-opacity:1" /> diff --git a/images/en/sensors/sensorsmaskxo.svg b/images/en/sensors/sensorsmaskxo.svg new file mode 100644 index 0000000..2adecbc --- /dev/null +++ b/images/en/sensors/sensorsmaskxo.svg @@ -0,0 +1,38 @@ + + + + + + + + + + diff --git a/images/en/syntaxerror.svg b/images/en/syntaxerror.svg new file mode 100644 index 0000000..792e725 --- /dev/null +++ b/images/en/syntaxerror.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + X + + + + + + + + + + + ??? + + + + + + + + ! + + diff --git a/images/en/toolbar/blocks-.svg b/images/en/toolbar/blocks-.svg deleted file mode 100644 index 5ff6345..0000000 --- a/images/en/toolbar/blocks-.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - + - - - Blocks - diff --git a/images/en/toolbar/hideshowon.svg b/images/en/toolbar/hideshowon.svg deleted file mode 100644 index 6f0ad56..0000000 --- a/images/en/toolbar/hideshowon.svg +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/en/toolbar/runoff.svg b/images/en/toolbar/runoff.svg deleted file mode 100644 index dfd8f3b..0000000 --- a/images/en/toolbar/runoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/en/toolbar/runon.svg b/images/en/toolbar/runon.svg deleted file mode 100644 index 4d26920..0000000 --- a/images/en/toolbar/runon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/en/toolbar/stepoff.svg b/images/en/toolbar/stepoff.svg deleted file mode 100644 index 1025dd4..0000000 --- a/images/en/toolbar/stepoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/en/toolbar/stepon.svg b/images/en/toolbar/stepon.svg deleted file mode 100644 index ebdc646..0000000 --- a/images/en/toolbar/stepon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/en/turtle/arc.svg b/images/en/turtle/arc.svg index d38beea..b703c87 100644 --- a/images/en/turtle/arc.svg +++ b/images/en/turtle/arc.svg @@ -41,24 +41,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/images/en/turtle/journal.svg b/images/en/turtle/journal.svg new file mode 100644 index 0000000..4859f58 --- /dev/null +++ b/images/en/turtle/journal.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/en/turtle/left.svg b/images/en/turtle/left.svg index 1326fc0..6752de9 100644 --- a/images/en/turtle/left.svg +++ b/images/en/turtle/left.svg @@ -34,24 +34,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/images/en/turtle/turtlegroup.svg b/images/en/turtle/turtlegroup.svg index d8311fe..89862e4 100644 --- a/images/en/turtle/turtlegroup.svg +++ b/images/en/turtle/turtlegroup.svg @@ -1,521 +1,604 @@ - + - - - - - - - - + + + + + + - - + - - + - - + - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - + - + - + - + - - - - + - + - + - + - - - - + + + + X - - - - clean - - - - - - - - forward - - - - - - - - back - - - - - - - - left - - - - - - - - right - - - - - - - - - - arc - - angle - radius - - - - - - - - - - setyx - - - x - y - - - - - - - - seth - - - - - - xcor - - - - - - ycor - - - - - - heading - - - - X + + + + clean + + + + + + forward + + + + + + back + + + + + + left + + + + + + right + + + + + + + + arc + + + angle + radius + + + + + + + + setyx + + + x + y + + + + + + seth + + + + xcor + + + + ycor + + + + heading + + + Turtle - - + id="tspan204" + style="font-size:20px">Turtle + + + + + + + + + + + + + + diff --git a/images/en/turtle/turtlemask.svg b/images/en/turtle/turtlemask.svg index 9f56748..8c2d12d 100644 --- a/images/en/turtle/turtlemask.svg +++ b/images/en/turtle/turtlemask.svg @@ -1,93 +1,152 @@ + + id="svg3190"> + + + + + + + + y="7" + id="rect3192" + style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:4;stroke-opacity:1" /> + transform="matrix(0.66667,0,0,0.66667,47.83321,33.999927)" + id="g3194"> + transform="matrix(0.66667,0,0,0.66667,7.9165167,75.999845)" + id="g3198"> + transform="matrix(0.66667,0,0,0.66667,77.916518,75.999845)" + id="g3202"> + transform="matrix(0.66667,0,0,0.66667,7.9165167,116.66652)" + id="g3205"> + transform="matrix(0.66667,0,0,0.66667,77.916518,116.66652)" + id="g3209"> + transform="matrix(0.66667,0,0,0.66667,43.416521,154.33273)" + id="g3212"> + + + transform="matrix(0.66667,0,0,0.66667,7.9165167,223.66673)" + id="g3216"> + transform="matrix(0.66667,0,0,0.66667,77.916518,223.66673)" + id="g3220" + style="fill:#000000;fill-opacity:1"> + + transform="matrix(0.66667,0,0,0.66667,37.333158,351.66664)" + id="g3224" + style="fill:#606060;fill-opacity:1;stroke:none"> + id="path3226" + style="fill:#606060;fill-opacity:1;stroke:none;stroke-width:2;stroke-opacity:1" /> + transform="matrix(0.66667,0,0,0.66667,37.333157,375.3333)" + id="g3228" + style="fill:#686868;fill-opacity:1;stroke:none"> + id="path3672" + style="fill:#686868;fill-opacity:1;stroke:none;stroke-width:2;stroke-opacity:1" /> + transform="matrix(0.66667,0,0,0.66667,37.333157,398.99996)" + id="g3231" + style="fill:#707070;fill-opacity:1;stroke:none"> + id="path3761" + style="fill:#707070;fill-opacity:1;stroke:none;stroke-width:2;stroke-opacity:1" /> - + d="M 122.383,292.628 L 114.00801,292.628 L 114.00801,294.628 L 103.008,294.628 L 103.008,292.628 L 95.133,292.61329 C 95.133,292.61329 93.190924,293.93233 92.508,294.628 C 91.965871,295.18025 90.633,297.628 90.633,297.628 L 90.633,331.248 C 90.633,331.248 90.953066,332.91231 91.382981,333.2505 C 91.798297,333.57721 93.632923,334.378 93.632923,334.378 L 103.633,334.378 L 103.633,336.253 L 113.633,336.253 L 113.633,334.378 L 137.133,334.378 L 137.133,296.628 L 125.133,296.628 L 123.883,294.128 L 122.383,292.628 z" + id="path3058" + style="fill:#585858;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> diff --git a/images/en/turtle/write.svg b/images/en/turtle/write.svg new file mode 100644 index 0000000..b61996b --- /dev/null +++ b/images/en/turtle/write.svg @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/es/toolbar/blocks-.svg b/images/es/toolbar/blocks-.svg deleted file mode 100644 index bdf593f..0000000 --- a/images/es/toolbar/blocks-.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - + - - - Bloques - diff --git a/images/es/toolbar/eraseroff.svg b/images/es/toolbar/eraseroff.svg deleted file mode 100644 index 9ffbb5e..0000000 --- a/images/es/toolbar/eraseroff.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/es/toolbar/eraseron.svg b/images/es/toolbar/eraseron.svg deleted file mode 100644 index dcb3ae3..0000000 --- a/images/es/toolbar/eraseron.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/es/toolbar/hideshowoff.svg b/images/es/toolbar/hideshowoff.svg deleted file mode 100644 index 19b49a3..0000000 --- a/images/es/toolbar/hideshowoff.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/es/toolbar/hideshowon.svg b/images/es/toolbar/hideshowon.svg deleted file mode 100644 index 6f0ad56..0000000 --- a/images/es/toolbar/hideshowon.svg +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/es/toolbar/runoff.svg b/images/es/toolbar/runoff.svg deleted file mode 100644 index dfd8f3b..0000000 --- a/images/es/toolbar/runoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/es/toolbar/runon.svg b/images/es/toolbar/runon.svg deleted file mode 100644 index 4d26920..0000000 --- a/images/es/toolbar/runon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/es/toolbar/stepon.svg b/images/es/toolbar/stepon.svg deleted file mode 100644 index ebdc646..0000000 --- a/images/es/toolbar/stepon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/es/toolbar/stopitoff.svg b/images/es/toolbar/stopitoff.svg deleted file mode 100644 index 78117ec..0000000 --- a/images/es/toolbar/stopitoff.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/es/toolbar/stopiton.svg b/images/es/toolbar/stopiton.svg deleted file mode 100644 index af01208..0000000 --- a/images/es/toolbar/stopiton.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/fi/toolbar/blocks-.svg b/images/fi/toolbar/blocks-.svg deleted file mode 100644 index f66f3d3..0000000 --- a/images/fi/toolbar/blocks-.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - + - - - Lohkot - diff --git a/images/fi/toolbar/eraseroff.svg b/images/fi/toolbar/eraseroff.svg deleted file mode 100644 index 9ffbb5e..0000000 --- a/images/fi/toolbar/eraseroff.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/fi/toolbar/eraseron.svg b/images/fi/toolbar/eraseron.svg deleted file mode 100644 index dcb3ae3..0000000 --- a/images/fi/toolbar/eraseron.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/fi/toolbar/hideshowoff.svg b/images/fi/toolbar/hideshowoff.svg deleted file mode 100644 index 19b49a3..0000000 --- a/images/fi/toolbar/hideshowoff.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/fi/toolbar/hideshowon.svg b/images/fi/toolbar/hideshowon.svg deleted file mode 100644 index 6f0ad56..0000000 --- a/images/fi/toolbar/hideshowon.svg +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/fi/toolbar/runoff.svg b/images/fi/toolbar/runoff.svg deleted file mode 100644 index dfd8f3b..0000000 --- a/images/fi/toolbar/runoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/fi/toolbar/runon.svg b/images/fi/toolbar/runon.svg deleted file mode 100644 index 4d26920..0000000 --- a/images/fi/toolbar/runon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/fi/toolbar/stepoff.svg b/images/fi/toolbar/stepoff.svg deleted file mode 100644 index 1025dd4..0000000 --- a/images/fi/toolbar/stepoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/fi/toolbar/stepon.svg b/images/fi/toolbar/stepon.svg deleted file mode 100644 index ebdc646..0000000 --- a/images/fi/toolbar/stepon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/fi/toolbar/stopitoff.svg b/images/fi/toolbar/stopitoff.svg deleted file mode 100644 index 78117ec..0000000 --- a/images/fi/toolbar/stopitoff.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/fi/toolbar/stopiton.svg b/images/fi/toolbar/stopiton.svg deleted file mode 100644 index af01208..0000000 --- a/images/fi/toolbar/stopiton.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/fr/toolbar/blocks-.svg b/images/fr/toolbar/blocks-.svg deleted file mode 100644 index 4b2fef3..0000000 --- a/images/fr/toolbar/blocks-.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - + - - - Blocs - diff --git a/images/fr/toolbar/eraseroff.svg b/images/fr/toolbar/eraseroff.svg deleted file mode 100644 index 9ffbb5e..0000000 --- a/images/fr/toolbar/eraseroff.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/fr/toolbar/eraseron.svg b/images/fr/toolbar/eraseron.svg deleted file mode 100644 index dcb3ae3..0000000 --- a/images/fr/toolbar/eraseron.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/fr/toolbar/hideshowoff.svg b/images/fr/toolbar/hideshowoff.svg deleted file mode 100644 index 19b49a3..0000000 --- a/images/fr/toolbar/hideshowoff.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/fr/toolbar/hideshowon.svg b/images/fr/toolbar/hideshowon.svg deleted file mode 100644 index 6f0ad56..0000000 --- a/images/fr/toolbar/hideshowon.svg +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/fr/toolbar/runoff.svg b/images/fr/toolbar/runoff.svg deleted file mode 100644 index dfd8f3b..0000000 --- a/images/fr/toolbar/runoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/fr/toolbar/runon.svg b/images/fr/toolbar/runon.svg deleted file mode 100644 index 4d26920..0000000 --- a/images/fr/toolbar/runon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/fr/toolbar/stepoff.svg b/images/fr/toolbar/stepoff.svg deleted file mode 100644 index 1025dd4..0000000 --- a/images/fr/toolbar/stepoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/fr/toolbar/stepon.svg b/images/fr/toolbar/stepon.svg deleted file mode 100644 index ebdc646..0000000 --- a/images/fr/toolbar/stepon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/fr/toolbar/stopitoff.svg b/images/fr/toolbar/stopitoff.svg deleted file mode 100644 index 78117ec..0000000 --- a/images/fr/toolbar/stopitoff.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/fr/toolbar/stopiton.svg b/images/fr/toolbar/stopiton.svg deleted file mode 100644 index af01208..0000000 --- a/images/fr/toolbar/stopiton.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/mn/toolbar/blocks-.svg b/images/mn/toolbar/blocks-.svg deleted file mode 100644 index a1d7fea..0000000 --- a/images/mn/toolbar/blocks-.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - + - - - Блокууд - diff --git a/images/mn/toolbar/eraseroff.svg b/images/mn/toolbar/eraseroff.svg deleted file mode 100644 index 9ffbb5e..0000000 --- a/images/mn/toolbar/eraseroff.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/mn/toolbar/eraseron.svg b/images/mn/toolbar/eraseron.svg deleted file mode 100644 index dcb3ae3..0000000 --- a/images/mn/toolbar/eraseron.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/mn/toolbar/hideshowoff.svg b/images/mn/toolbar/hideshowoff.svg deleted file mode 100644 index 19b49a3..0000000 --- a/images/mn/toolbar/hideshowoff.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/mn/toolbar/hideshowon.svg b/images/mn/toolbar/hideshowon.svg deleted file mode 100644 index 6f0ad56..0000000 --- a/images/mn/toolbar/hideshowon.svg +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/mn/toolbar/runoff.svg b/images/mn/toolbar/runoff.svg deleted file mode 100644 index dfd8f3b..0000000 --- a/images/mn/toolbar/runoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/mn/toolbar/runon.svg b/images/mn/toolbar/runon.svg deleted file mode 100644 index 4d26920..0000000 --- a/images/mn/toolbar/runon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/mn/toolbar/stepoff.svg b/images/mn/toolbar/stepoff.svg deleted file mode 100644 index 1025dd4..0000000 --- a/images/mn/toolbar/stepoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/mn/toolbar/stepon.svg b/images/mn/toolbar/stepon.svg deleted file mode 100644 index ebdc646..0000000 --- a/images/mn/toolbar/stepon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/mn/toolbar/stopitoff.svg b/images/mn/toolbar/stopitoff.svg deleted file mode 100644 index 78117ec..0000000 --- a/images/mn/toolbar/stopitoff.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/mn/toolbar/stopiton.svg b/images/mn/toolbar/stopiton.svg deleted file mode 100644 index af01208..0000000 --- a/images/mn/toolbar/stopiton.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/pt/toolbar/blocks-.svg b/images/pt/toolbar/blocks-.svg deleted file mode 100644 index 8cfbb78..0000000 --- a/images/pt/toolbar/blocks-.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - + - - - Blocos - diff --git a/images/pt/toolbar/eraseroff.svg b/images/pt/toolbar/eraseroff.svg deleted file mode 100644 index 9ffbb5e..0000000 --- a/images/pt/toolbar/eraseroff.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/pt/toolbar/eraseron.svg b/images/pt/toolbar/eraseron.svg deleted file mode 100644 index dcb3ae3..0000000 --- a/images/pt/toolbar/eraseron.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/pt/toolbar/hideshowoff.svg b/images/pt/toolbar/hideshowoff.svg deleted file mode 100644 index 19b49a3..0000000 --- a/images/pt/toolbar/hideshowoff.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/pt/toolbar/hideshowon.svg b/images/pt/toolbar/hideshowon.svg deleted file mode 100644 index 6f0ad56..0000000 --- a/images/pt/toolbar/hideshowon.svg +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/pt/toolbar/runoff.svg b/images/pt/toolbar/runoff.svg deleted file mode 100644 index dfd8f3b..0000000 --- a/images/pt/toolbar/runoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/pt/toolbar/runon.svg b/images/pt/toolbar/runon.svg deleted file mode 100644 index 4d26920..0000000 --- a/images/pt/toolbar/runon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/pt/toolbar/stepoff.svg b/images/pt/toolbar/stepoff.svg deleted file mode 100644 index 1025dd4..0000000 --- a/images/pt/toolbar/stepoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/pt/toolbar/stepon.svg b/images/pt/toolbar/stepon.svg deleted file mode 100644 index ebdc646..0000000 --- a/images/pt/toolbar/stepon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/pt/toolbar/stopitoff.svg b/images/pt/toolbar/stopitoff.svg deleted file mode 100644 index 78117ec..0000000 --- a/images/pt/toolbar/stopitoff.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/pt/toolbar/stopiton.svg b/images/pt/toolbar/stopiton.svg deleted file mode 100644 index af01208..0000000 --- a/images/pt/toolbar/stopiton.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/ru/toolbar/blocks-.svg b/images/ru/toolbar/blocks-.svg deleted file mode 100644 index d7d13c5..0000000 --- a/images/ru/toolbar/blocks-.svg +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - + - - - - Блоки - - diff --git a/images/ru/toolbar/eraseroff.svg b/images/ru/toolbar/eraseroff.svg deleted file mode 100644 index 9ffbb5e..0000000 --- a/images/ru/toolbar/eraseroff.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/ru/toolbar/eraseron.svg b/images/ru/toolbar/eraseron.svg deleted file mode 100644 index dcb3ae3..0000000 --- a/images/ru/toolbar/eraseron.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/ru/toolbar/hideshowoff.svg b/images/ru/toolbar/hideshowoff.svg deleted file mode 100644 index 19b49a3..0000000 --- a/images/ru/toolbar/hideshowoff.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/ru/toolbar/hideshowon.svg b/images/ru/toolbar/hideshowon.svg deleted file mode 100644 index 6f0ad56..0000000 --- a/images/ru/toolbar/hideshowon.svg +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/ru/toolbar/runoff.svg b/images/ru/toolbar/runoff.svg deleted file mode 100644 index dfd8f3b..0000000 --- a/images/ru/toolbar/runoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/ru/toolbar/runon.svg b/images/ru/toolbar/runon.svg deleted file mode 100644 index 4d26920..0000000 --- a/images/ru/toolbar/runon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/ru/toolbar/stepoff.svg b/images/ru/toolbar/stepoff.svg deleted file mode 100644 index 1025dd4..0000000 --- a/images/ru/toolbar/stepoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/ru/toolbar/stepon.svg b/images/ru/toolbar/stepon.svg deleted file mode 100644 index ebdc646..0000000 --- a/images/ru/toolbar/stepon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/ru/toolbar/stopitoff.svg b/images/ru/toolbar/stopitoff.svg deleted file mode 100644 index 78117ec..0000000 --- a/images/ru/toolbar/stopitoff.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/ru/toolbar/stopiton.svg b/images/ru/toolbar/stopiton.svg deleted file mode 100644 index af01208..0000000 --- a/images/ru/toolbar/stopiton.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/tr/toolbar/blocks-.svg b/images/tr/toolbar/blocks-.svg deleted file mode 100644 index 8959ad4..0000000 --- a/images/tr/toolbar/blocks-.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - + - - - Parçalar - diff --git a/images/tr/toolbar/eraseroff.svg b/images/tr/toolbar/eraseroff.svg deleted file mode 100644 index 9ffbb5e..0000000 --- a/images/tr/toolbar/eraseroff.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/tr/toolbar/eraseron.svg b/images/tr/toolbar/eraseron.svg deleted file mode 100644 index dcb3ae3..0000000 --- a/images/tr/toolbar/eraseron.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/images/tr/toolbar/hideshowoff.svg b/images/tr/toolbar/hideshowoff.svg deleted file mode 100644 index 19b49a3..0000000 --- a/images/tr/toolbar/hideshowoff.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/tr/toolbar/hideshowon.svg b/images/tr/toolbar/hideshowon.svg deleted file mode 100644 index 6f0ad56..0000000 --- a/images/tr/toolbar/hideshowon.svg +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/tr/toolbar/runoff.svg b/images/tr/toolbar/runoff.svg deleted file mode 100644 index dfd8f3b..0000000 --- a/images/tr/toolbar/runoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/tr/toolbar/runon.svg b/images/tr/toolbar/runon.svg deleted file mode 100644 index 4d26920..0000000 --- a/images/tr/toolbar/runon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/tr/toolbar/stepoff.svg b/images/tr/toolbar/stepoff.svg deleted file mode 100644 index 1025dd4..0000000 --- a/images/tr/toolbar/stepoff.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/tr/toolbar/stepon.svg b/images/tr/toolbar/stepon.svg deleted file mode 100644 index ebdc646..0000000 --- a/images/tr/toolbar/stepon.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/tr/toolbar/stopitoff.svg b/images/tr/toolbar/stopitoff.svg deleted file mode 100644 index 78117ec..0000000 --- a/images/tr/toolbar/stopitoff.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/images/tr/toolbar/stopiton.svg b/images/tr/toolbar/stopiton.svg deleted file mode 100644 index af01208..0000000 --- a/images/tr/toolbar/stopiton.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/taexport.py b/taexportlogo.py index 0ab5399..bb35b5f 100644 --- a/taexport.py +++ b/taexportlogo.py @@ -20,6 +20,8 @@ import tawindow import talogo +import re +import math def save_logo(self, tw): color_processing = "\ @@ -85,6 +87,7 @@ tasetshade :shade \r" bs = tawindow.blocks(tw) code = "" + # these flags are used to trigger the prepending of additional procedures random = 0 fillscreen = 0 setcolor = 0 @@ -93,9 +96,12 @@ tasetshade :shade \r" tastack = 0 arc = 0 heap = 0 + write = 0 + minus = 0 + image = 0 for b in bs: this_stack = "" - data = self.walk_stack(tw, b) + data = walk_stack(self, tw, b) # need to catch several special cases: # stacks, random, setshade, et al. stack = 0 @@ -109,20 +115,23 @@ tasetshade :shade \r" if namedbox == 1: myvar += str(d) myvar += " " + elif write == 1: + this_stack += "labelsize " + this_stack += str(d) else: this_stack += str(d) else: # transalate some TA terms into UCB Logo if namedstack == 1: this_stack += "to " - this_stack += d[2:] + this_stack += re.sub("\s","_",d[2:]) this_stack += "\r" stack = 1 namedstack = 0 elif namedbox == 1: if d[0:2] == "#s": this_stack += "make \"" - this_stack += d[2:] + this_stack += re.sub("\s","_",d[2:]) this_stack += " " this_stack += myvar namedbox = 0 @@ -130,12 +139,12 @@ tasetshade :shade \r" else: myvar += d elif refstack == 1: - this_stack += d[2:] + this_stack += re.sub("\s","_",d[2:]) this_stack += " " refstack = 0 elif refbox == 1: this_stack += ":" - this_stack += d[2:] + this_stack += re.sub("\s","_",d[2:]) refbox = 0 elif d == "stack": refstack = 1 @@ -168,6 +177,8 @@ tasetshade :shade \r" stack = 1 elif d == "nop3": namedstack = 1 + elif d == "stopstack": + this_stack += "stop" elif d == "clean": this_stack += "clearscreen" elif d == "setxy": @@ -202,6 +213,37 @@ tasetshade :shade \r" elif d == "emptyheap": heap = 1 this_stack += "taclearheap" + elif d == "kbinput": + this_stack += "make \"keyboard readchar" + elif d == "keyboard": + this_stack += ":keyboard" + elif d == 'insertimage': + image = 1 + elif image == 1: + # skip this arg + image = 2 + elif image == 2: + # skip this arg + image = 0 + elif d[0:1] == "#s": + # output single characters as a string + if len(d[2:]) == 1: + this_stack += "\"" + this_stack += d[2:] + # make a sentence out of everything else + else: + this_stack += "sentence " + this_stack += re.sub("\s"," \"",d[2:]) + this_stack += "\r" + elif d == "write": + this_stack == "label" + write = 1 + elif d == "minus": + this_stack == "taminus" + minus = 1 + elif d == "hideblocks": + this_stack += " " + # need to handle templates somehow else: this_stack += d this_stack += " " @@ -215,6 +257,8 @@ tasetshade :shade \r" code += this_stack code += "\rend\r" # need to define some procedures + if minus: # minus only takes on arg + code = "to taminus :y :x\routput sum :x minus :y\rend\r" + code if random: # to avoid negative numbers code = "to tarandom :min :max\routput (random (:max - :min)) + :min\rend\r" + code if fillscreen: # set shade than background color @@ -224,7 +268,7 @@ tasetshade :shade \r" if pensize: # return only first argument code = "to tapensize\routput first round pensize\rend\r" + code if setxy: # swap args and round args - code = "to tasetxy :y :x\rpenup\rsetxy :x :y\rpendown\rend\r" + code + code = "to tasetxy :x :y\rpenup\rsetxy :x :y\rpendown\rend\r" + code if arc: # need to redefine this one all together c = (2 * math.pi)/360 code = "to taarc :a :r\rrepeat round :a [right 1 forward (" + str(c) + " * :r)]\rend\r" + code @@ -243,7 +287,7 @@ def walk_stack(self, tw, spr): top = tawindow.find_top_block(spr) if spr == top: # only walk the stack if the block is the top block - return talogo.walk_blocks(tw.lc, top, tawindow.blocks(tw)) + return talogo.run_blocks(tw.lc, top, tawindow.blocks(tw), False) else: # not top of stack, then return empty list return [] diff --git a/talogo.py b/talogo.py index efc6e86..d4b2709 100644 --- a/talogo.py +++ b/talogo.py @@ -20,6 +20,7 @@ import re from time import clock +import gobject from operator import isNumberType import random import audioop @@ -27,7 +28,9 @@ from math import sqrt from numpy.oldnumeric import * from numpy.fft import * from audiograb import AudioGrab +import subprocess from UserDict import UserDict +from sugar.datastore import datastore class noKeyError(UserDict): __missing__=lambda x,y: 0 @@ -36,6 +39,7 @@ class taLogo: pass from taturtle import * + procstop = False class symbol: @@ -53,7 +57,7 @@ class logoerror(Exception): def __str__(self): return repr(self.value) -def run_blocks(lc, spr, blocks): +def run_blocks(lc, spr, blocks, run_flag): # user-defined stacks for x in lc.stacks.keys(): lc.stacks[x]= None @@ -61,44 +65,42 @@ def run_blocks(lc, spr, blocks): lc.stacks['stack1'] = None lc.stacks['stack2'] = None for i in blocks: - if i.proto.name=='hat1': lc.stacks['stack1']= readline(lc,blocks_to_code(i)) - if i.proto.name=='hat2': lc.stacks['stack2']= readline(lc,blocks_to_code(i)) + if i.proto.name=='hat1': + lc.stacks['stack1']= readline(lc,blocks_to_code(lc,i)) + if i.proto.name=='hat2': + lc.stacks['stack2']= readline(lc,blocks_to_code(lc,i)) if i.proto.name=='hat': if (i.connections[1]!=None): text=i.connections[1].label - lc.stacks['stack3'+text]= readline(lc,blocks_to_code(i)) - code = blocks_to_code(spr) - print code - setup_cmd(lc, code) - -# walk through the blocks, but don't execute them -# used by save to USB Logo code -def walk_blocks(lc, spr, blocks): - for x in lc.stacks.keys(): - lc.stacks[x]= None - lc.stacks['stack1'] = None - lc.stacks['stack2'] = None - for i in blocks: - if i.proto.name=='hat1': lc.stacks['stack1']= readline(lc,blocks_to_code(i)) - if i.proto.name=='hat2': lc.stacks['stack2']= readline(lc,blocks_to_code(i)) - if i.proto.name=='hat': - if (i.connections[1]!=None): - text=i.connections[1].label - lc.stacks['stack3'+text]= readline(lc,blocks_to_code(i)) - return blocks_to_code(spr) - -def blocks_to_code(spr): + lc.stacks['stack3'+text]= readline(lc,blocks_to_code(lc,i)) + code = blocks_to_code(lc,spr) + if run_flag == True: + print code + setup_cmd(lc, code) + else: return code + +def blocks_to_code(lc,spr): if spr==None: return ['%nothing%'] code = [] dock = spr.proto.docks[0] if len(dock)>4: code.append(dock[4]) if spr.proto.primname != '': code.append(spr.proto.primname) -# else: code.append(float(spr.label)) else: if spr.proto.name=='number': - code.append(float(spr.label)) - elif spr.proto.name=='string': - code.append('#s'+spr.label) + try: + code.append(float(spr.label)) + except: + code.append(float(ord(spr.label[0]))) + elif spr.proto.name=='string' or spr.proto.name=='title': + if type(spr.label) == float or type(spr.label) == int: + code.append('#s'+str(spr.label)) + else: + code.append('#s'+spr.label) + elif spr.proto.name=='journal': + if spr.ds_id != None: + code.append('#smedia_'+str(spr.ds_id)) + else: + code.append('#smedia_None') else: return ['%nothing%'] for i in range(1,len(spr.connections)): @@ -106,8 +108,9 @@ def blocks_to_code(spr): dock = spr.proto.docks[i] if len(dock)>4: for c in dock[4]: code.append(c) - if b!=None: code.extend(blocks_to_code(b)) - elif spr.proto.docks[i][0] not in ['flow','numend','stringend','unavailable','logi-']: + if b!=None: code.extend(blocks_to_code(lc,b)) + elif spr.proto.docks[i][0] not in \ + ['flow', 'numend', 'stringend', 'unavailable', 'logi-']: code.append('%nothing%') return code @@ -127,7 +130,8 @@ def readline(lc, line): token = line.pop(0) if isNumberType(token): res.append(token) elif token.isdigit(): res.append(float(token)) - elif token[0]=='-' and token[1:].isdigit(): res.append(-float(token[1:])) + elif token[0]=='-' and token[1:].isdigit(): + res.append(-float(token[1:])) elif token[0] == '"': res.append(token[1:]) elif token[0:2] == "#s": res.append(token[2:]) elif token == '[': res.append(readline(lc,line)) @@ -136,7 +140,8 @@ def readline(lc, line): return res def setup_cmd(lc, str): - stopsignon(lc); lc.procstop=False + setlayer(lc.tw.turtle.spr,100) + lc.procstop=False list = readline(lc, str) lc.step = start_eval(lc, list) @@ -186,13 +191,17 @@ def evalsym(lc, token): icall(lc, eval); yield True lc.arglist.append(lc.iresult) if lc.cfun.rprim: - if type(lc.cfun.fcn)==lc.listtype: icall(lc, ufuncall, cfun.fcn); yield True - else: icall(lc, lc.cfun.fcn, *lc.arglist); yield True + if type(lc.cfun.fcn)==lc.listtype: + icall(lc, ufuncall, cfun.fcn); yield True + else: + icall(lc, lc.cfun.fcn, *lc.arglist); yield True result = None - else: result = lc.cfun.fcn(lc, *lc.arglist) + else: + result = lc.cfun.fcn(lc, *lc.arglist) lc.cfun, lc.arglist = oldcfun, oldarglist if lc.arglist!=None and result==None: - raise logoerror("%s didn't output to %s" % (oldcfun.name, lc.cfun.name)) + raise logoerror("%s didn't output to %s" % \ + (oldcfun.name, lc.cfun.name)) ireturn(lc, result); yield True def evalinfix(lc, firstarg): @@ -258,7 +267,8 @@ def prim_define(name, body): name.rprim = True def prim_stack(lc,stri): - if (not lc.stacks.has_key('stack3'+stri)) or lc.stacks['stack3'+stri]==None: raise logoerror("#nostack") + if (not lc.stacks.has_key('stack3'+stri)) or \ + lc.stacks['stack3'+stri]==None: raise logoerror("#nostack") icall(lc, evline, lc.stacks['stack3'+stri][:]); yield True lc.procstop = False ireturn(lc); yield True @@ -279,53 +289,120 @@ def prim_stopstack(lc): lc.procstop = True def careful_divide(x,y): - if y==0: return 0 - return x/y + try: + if y==0: return 0 + return x/y + except: + return 0 def ufuncall(body): ijmp(evline, body); yield True def an_int(lc, n): - try: return int(n) - except: raise logoerror("%s doesn't like %s as input" % (lc.cfun.name, str(n))) - -def a_float(n): - try: return int(n) - except: raise logoerror("%s doesn't like %s as input" % (cfun.name, str(n))) + if type(n) == int: + return n + elif type(n) == float: + return int(n) + elif type(n) == str: + return int(ord(n[0])) + else: + raise logoerror("%s doesn't like %s as input" \ + % (lc.cfun.name, str(n))) def defprim(lc, name, args, fcn, rprim=False): sym = intern(lc, name) sym.nargs, sym.fcn = args,fcn sym.rprim = rprim +def taequal(x,y): + try: + return float(x)==float(y) + except: + if type(x) == str: + xx = ord(x[0]) + else: + xx = x + if type(y) == str: + yy = ord(y[0]) + else: + yy = y + return xx==yy + +def taless(x,y): + try: + return(xfloat(y)) - defprim(lc,'less?', 2, lambda lc,x,y: float(x)spr.y+spr.height: return False if isinstance(spr.image,gtk.gdk.Pixmap): return True dx,dy = x-spr.x, y-spr.y - return ord(spr.image.get_pixels()[(dy*spr.width+dx)*4+3]) == 255 + try: + return ord(spr.image.get_pixels()[(dy*spr.width+dx)*4+3]) == 255 + except IndexError: + print "IndexError: string index out of range" + dy + " " + spr.width + " " + dx + return True def draw_label1(spr, label): fd = pango.FontDescription('Sans') @@ -109,7 +121,7 @@ def draw_label1(spr, label): sheight = pl.get_size()[1]/pango.SCALE centerx = spr.x+spr.width/2 centery = spr.y+spr.height/2 - spr.tw.gc.set_foreground(spr.tw.textcolor) + spr.tw.gc.set_foreground(spr.tw.msgcolor) spr.tw.area.draw_layout(spr.tw.gc,centerx-swidth/2,centery-sheight/2,pl) def draw_label2(spr, label): @@ -119,10 +131,9 @@ def draw_label2(spr, label): pl.set_font_description(fd) sheight = pl.get_size()[1]/pango.SCALE centery = spr.y+spr.height/2 - spr.tw.gc.set_foreground(spr.tw.textcolor) + spr.tw.gc.set_foreground(spr.tw.msgcolor) spr.tw.area.draw_layout(spr.tw.gc,spr.x+70,centery-sheight/2,pl) - def getpixel(image,x,y): array = image.get_pixels() offset = (y*image.get_width()+x)*4 diff --git a/taturtle.py b/taturtle.py index 8fbd1e1..7b9ca6a 100644 --- a/taturtle.py +++ b/taturtle.py @@ -29,16 +29,26 @@ colors = {} DEGTOR = 2*pi/360 color_table = ( - 0xFF0000,0xFF0D00,0xFF1A00,0xFF2600,0xFF3300,0xFF4000,0xFF4D00,0xFF5900,0xFF6600,0xFF7300, - 0xFF8000,0xFF8C00,0xFF9900,0xFFA600,0xFFB300,0xFFBF00,0xFFCC00,0xFFD900,0xFFE600,0xFFF200, - 0xFFFF00,0xE6FF00,0xCCFF00,0xB3FF00,0x99FF00,0x80FF00,0x66FF00,0x4DFF00,0x33FF00,0x1AFF00, - 0x00FF00,0x00FF0D,0x00FF1A,0x00FF26,0x00FF33,0x00FF40,0x00FF4D,0x00FF59,0x00FF66,0x00FF73, - 0x00FF80,0x00FF8C,0x00FF99,0x00FFA6,0x00FFB3,0x00FFBF,0x00FFCC,0x00FFD9,0x00FFE6,0x00FFF2, - 0x00FFFF,0x00F2FF,0x00E6FF,0x00D9FF,0x00CCFF,0x00BFFF,0x00B3FF,0x00A6FF,0x0099FF,0x008CFF, - 0x0080FF,0x0073FF,0x0066FF,0x0059FF,0x004DFF,0x0040FF,0x0033FF,0x0026FF,0x001AFF,0x000DFF, - 0x0000FF,0x0D00FF,0x1A00FF,0x2600FF,0x3300FF,0x4000FF,0x4D00FF,0x5900FF,0x6600FF,0x7300FF, - 0x8000FF,0x8C00FF,0x9900FF,0xA600FF,0xB300FF,0xBF00FF,0xCC00FF,0xD900FF,0xE600FF,0xF200FF, - 0xFF00FF,0xFF00E6,0xFF00CC,0xFF00B3,0xFF0099,0xFF0080,0xFF0066,0xFF004D,0xFF0033,0xFF001A) + 0xFF0000,0xFF0D00,0xFF1A00,0xFF2600,0xFF3300, + 0xFF4000,0xFF4D00,0xFF5900,0xFF6600,0xFF7300, + 0xFF8000,0xFF8C00,0xFF9900,0xFFA600,0xFFB300, + 0xFFBF00,0xFFCC00,0xFFD900,0xFFE600,0xFFF200, + 0xFFFF00,0xE6FF00,0xCCFF00,0xB3FF00,0x99FF00, + 0x80FF00,0x66FF00,0x4DFF00,0x33FF00,0x1AFF00, + 0x00FF00,0x00FF0D,0x00FF1A,0x00FF26,0x00FF33, + 0x00FF40,0x00FF4D,0x00FF59,0x00FF66,0x00FF73, + 0x00FF80,0x00FF8C,0x00FF99,0x00FFA6,0x00FFB3, + 0x00FFBF,0x00FFCC,0x00FFD9,0x00FFE6,0x00FFF2, + 0x00FFFF,0x00F2FF,0x00E6FF,0x00D9FF,0x00CCFF, + 0x00BFFF,0x00B3FF,0x00A6FF,0x0099FF,0x008CFF, + 0x0080FF,0x0073FF,0x0066FF,0x0059FF,0x004DFF, + 0x0040FF,0x0033FF,0x0026FF,0x001AFF,0x000DFF, + 0x0000FF,0x0D00FF,0x1A00FF,0x2600FF,0x3300FF, + 0x4000FF,0x4D00FF,0x5900FF,0x6600FF,0x7300FF, + 0x8000FF,0x8C00FF,0x9900FF,0xA600FF,0xB300FF, + 0xBF00FF,0xCC00FF,0xD900FF,0xE600FF,0xF200FF, + 0xFF00FF,0xFF00E6,0xFF00CC,0xFF00B3,0xFF0099, + 0xFF0080,0xFF0066,0xFF004D,0xFF0033,0xFF001A) def tNew(tw,w,h): t = taTurtle() @@ -46,7 +56,8 @@ def tNew(tw,w,h): t.canvas = sprNew(tw,0,0,gtk.gdk.Pixmap(tw.area,w,h,-1)) t.canvas.type = 'canvas' setlayer(t.canvas,600) - t.shapelist = [load_image(tw.path, 'shapes','t'+str(i)) for i in range(36)] + t.shapelist = \ + [load_image(tw.path, 'shapes','t'+str(i)) for i in range(36)] t.spr = sprNew(tw,100,100,t.shapelist[0]) t.spr.type = 'turtle' setlayer(t.spr, 630) @@ -63,6 +74,7 @@ def clearscreen(t): invalt(t,0,0,t.width,t.height) setpensize(t,5) setcolor(t,0) + settextcolor(t,70) setshade(t,50) t.pendown = True move_turtle(t) @@ -70,30 +82,43 @@ def clearscreen(t): return None def forward(t, n): - t.gc.set_foreground(t.fgcolor) + t.gc.set_foreground(t.tw.fgcolor) oldx, oldy = t.xcor, t.ycor - t.xcor += n*sin(t.heading*DEGTOR) - t.ycor += n*cos(t.heading*DEGTOR) - if t.pendown: draw_line(t,oldx,oldy,t.xcor,t.ycor) + try: + t.xcor += n*sin(t.heading*DEGTOR) + t.ycor += n*cos(t.heading*DEGTOR) + except: + pass + if t.pendown: + draw_line(t,oldx,oldy,t.xcor,t.ycor) move_turtle(t) return None def seth(t,n): - t.heading=n + try: + t.heading=n + except: + pass t.heading%=360 turn_turtle(t) return None def right(t,n): - t.heading+=n + try: + t.heading+=n + except: + pass t.heading%=360 turn_turtle(t) return None def arc(t,a,r): - t.gc.set_foreground(t.fgcolor) - if a<0: larc(t,-a,r) - else: rarc(t,a,r) + t.gc.set_foreground(t.tw.fgcolor) + try: + if a<0: larc(t,-a,r) + else: rarc(t,a,r) + except: + pass move_turtle(t) turn_turtle(t) @@ -103,7 +128,8 @@ def rarc(t,a,r): cy = t.ycor-r*sin(t.heading*DEGTOR) x,y,w,h=t.width/2+int(cx-r),t.height/2-int(cy+r),int(2*r),int(2*r) if t.pendown: - t.canvas.image.draw_arc(t.gc,False,x,y,w,h,int(180-t.heading-a)*64,int(a)*64) + t.canvas.image.draw_arc(t.gc,False,x,y,w,h, \ + int(180-t.heading-a)*64,int(a)*64) invalt(t,x-t.pensize/2-3,y-t.pensize/2-3,w+t.pensize+6,h+t.pensize+6) right(t,a) t.xcor=cx-r*cos(t.heading*DEGTOR) @@ -115,40 +141,67 @@ def larc(t,a,r): cy = t.ycor+r*sin(t.heading*DEGTOR) x,y,w,h=t.width/2+int(cx-r),t.height/2-int(cy+r),int(2*r),int(2*r) if t.pendown: - t.canvas.image.draw_arc(t.gc,False,x,y,w,h,int(360-t.heading)*64,int(a)*64) + t.canvas.image.draw_arc(t.gc,False,x,y,w,h,int(360-t.heading)*64, \ + int(a)*64) invalt(t,x-t.pensize/2-3,y-t.pensize/2-3,w+t.pensize+6,h+t.pensize+6) right(t,-a) t.xcor=cx+r*cos(t.heading*DEGTOR) t.ycor=cy-r*sin(t.heading*DEGTOR) def setxy(t,x,y): - t.xcor,t.ycor = x,y + try: + t.xcor,t.ycor = x,y + except: + pass move_turtle(t) def setpensize(t,ps): - if ps<0: ps=0; - t.pensize = ps - t.gc.set_line_attributes(int(t.pensize),gtk.gdk.LINE_SOLID,gtk.gdk.CAP_ROUND,gtk.gdk.JOIN_MITER) + try: + if ps<0: + ps=0; + t.pensize = ps + except: + pass + t.gc.set_line_attributes(int(t.pensize),gtk.gdk.LINE_SOLID, \ + gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_MITER) return None def setcolor(t,c): - t.color = c + try: + t.color = c + except: + pass set_fgcolor(t) return None +def settextcolor(t,c): + try: + t.tcolor = c + except: + pass + set_textcolor(t) + return None + def setshade(t,s): - t.shade = s + try: + t.shade = s + except: + pass set_fgcolor(t) + set_textcolor(t) return None def fillscreen(t,c,s): oldc, olds = t.color,t.shade - setcolor(t,c); setshade(t,s) - rect = gtk.gdk.Rectangle(0,0,t.width,t.height) - t.gc.set_foreground(t.fgcolor) - t.canvas.image.draw_rectangle(t.gc, True, *rect) - invalt(t,0,0,t.width,t.height) - setcolor(t,oldc); setshade(t,olds) + try: + setcolor(t,c); setshade(t,s) + rect = gtk.gdk.Rectangle(0,0,t.width,t.height) + t.gc.set_foreground(t.tw.fgcolor) + t.canvas.image.draw_rectangle(t.gc, True, *rect) + invalt(t,0,0,t.width,t.height) + setcolor(t,oldc); setshade(t,olds) + except: + pass return None def set_fgcolor(t): @@ -156,7 +209,14 @@ def set_fgcolor(t): rgb = color_table[wrap100(t.color)] r,g,b = (rgb>>8)&0xff00,rgb&0xff00,(rgb<<8)&0xff00 r,g,b = calc_shade(r,sh),calc_shade(g,sh),calc_shade(b,sh) - t.fgcolor = t.tw.cm.alloc_color(r,g,b) + t.tw.fgcolor = t.tw.cm.alloc_color(r,g,b) + +def set_textcolor(t): + sh = (wrap100(t.shade)-50)/50.0 + rgb = color_table[wrap100(t.tcolor)] + r,g,b = (rgb>>8)&0xff00,rgb&0xff00,(rgb<<8)&0xff00 + r,g,b = calc_shade(r,sh),calc_shade(g,sh),calc_shade(b,sh) + t.tw.textcolor = t.tw.cm.alloc_color(r,g,b) def wrap100(n): n = int(n) @@ -171,6 +231,24 @@ def calc_shade(c,s): def setpen(t,bool): t.pendown = bool +def draw_pixbuf(t,pixbuf,a,b,x,y,w,h): + t.canvas.image.draw_pixbuf(t.gc, pixbuf, a, b, x, y) + invalt(t,x,y,w,h) + +def draw_text(t, label, x, y, size, w): + t.gc.set_foreground(t.tw.textcolor) + fd = pango.FontDescription('Sans') + try: + fd.set_size(size*pango.SCALE) + except: + pass + pl = t.tw.window.create_pango_layout(str(label)) + pl.set_font_description(fd) + pl.set_width(w*pango.SCALE) + t.canvas.image.draw_layout(t.gc,x,y,pl) + w,h = pl.get_pixel_size() + invalt(t,x,y,w,h) + def draw_line(t,x1,y1,x2,y2): x1,y1 = t.width/2+int(x1), t.height/2-int(y1) x2,y2 = t.width/2+int(x2), t.height/2-int(y2) @@ -180,7 +258,8 @@ def draw_line(t,x1,y1,x2,y2): else: miny,maxy=y2,y1 w,h=maxx-minx,maxy-miny t.canvas.image.draw_line(t.gc,x1,y1,x2,y2) - invalt(t,minx-t.pensize/2-3,miny-t.pensize/2-3,w+t.pensize+6,h+t.pensize+6) + invalt(t,minx-t.pensize/2-3,miny-t.pensize/2-3,w+t.pensize+6, \ + h+t.pensize+6) def turn_turtle(t): setshape(t.spr, t.shapelist[(int(t.heading+5)%360)/10]) @@ -191,7 +270,8 @@ def move_turtle(t): invalt(t,x-30,y-30,60,60) def invalt(t,x,y,w,h): - rect = gtk.gdk.Rectangle(int(x+t.canvas.x),int(y+t.canvas.y),int(w),int(h)) + rect = gtk.gdk.Rectangle(int(x+t.canvas.x),int(y+t.canvas.y), \ + int(w),int(h)) t.tw.area.invalidate_rect(rect, False) diff --git a/tawindow.py b/tawindow.py index f6f259d..388055e 100644 --- a/tawindow.py +++ b/tawindow.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- #Copyright (c) 2007-9, Playful Invention Company. #Permission is hereby granted, free of charge, to any person obtaining a copy @@ -21,9 +22,12 @@ import pygtk pygtk.require('2.0') import gtk +import pango import gobject import os import os.path +import time + class taWindow: pass from math import atan2, pi @@ -34,22 +38,23 @@ from tasprites import * from talogo import * from taturtle import * from taproject import * +from sugar.graphics.objectchooser import ObjectChooser # # Setup # -def twNew(win, path, lang, tboxh, parent=None): +def twNew1(win, path, lang, tboxh, parent=None): tw = taWindow() tw.window = win tw.path = os.path.join(path,'images',lang) + tw.load_save_folder = os.path.join(path,'samples',lang) + tw.save_folder = None + tw.save_file_name = None win.set_flags(gtk.CAN_FOCUS) - print "width: ", gtk.gdk.screen_width() - width = gtk.gdk.screen_width() - print "height: ", gtk.gdk.screen_height() - # subtract toolbar height - height = gtk.gdk.screen_height() - tboxh - win.set_size_request(width, height) + tw.width = gtk.gdk.screen_width() + tw.height = gtk.gdk.screen_height() - tboxh + win.set_size_request(tw.width, tw.height) if parent is None: win.show_all() else: parent.show_all() win.add_events(gtk.gdk.BUTTON_PRESS_MASK) @@ -61,25 +66,56 @@ def twNew(win, path, lang, tboxh, parent=None): win.connect("button-release-event", buttonrelease_cb, tw) win.connect("motion-notify-event", move_cb, tw) win.connect("key_press_event", keypress_cb, tw) + tw.keypress = "" + tw.keyvalue = 0 tw.area = win.window tw.gc = tw.area.new_gc() - tw. cm = tw.gc.get_colormap() + # tw.window.textentry = gtk.Entry() + # on an OLPC-XO-1, there is a scaling factor + if os.path.exists('/sys/power/olpc-pm'): + tw.scale = 1 + else: tw.scale = 1.6 + + # put a wait brick up +# print 'trying to put up wait brick' + try: + wait_block = gtk.gdk.pixbuf_new_from_file( \ + os.path.join(activity.get_activity_root(),"data",'wait.png')) + except: + try: wait_block = gtk.gdk.pixbuf_new_from_file( \ + os.path.join(tw.path,'flow','wait.svg')) + except: print 'couldn not open wait.svg' + tw.area.draw_pixbuf(tw.gc, wait_block, 0, 0, (tw.width/2)-22, \ + (tw.height/2)-43) + rect = gtk.gdk.Rectangle(int((tw.width/2)-22), int((tw.height/2)-43), \ + 44, 87) + tw.area.invalidate_rect(rect, False) + return tw + +def millis(): return int(clock()*1000) + +def twNew2(tw): + tw.cm = tw.gc.get_colormap() tw.bgcolor = tw.cm.alloc_color('#fff8de') - tw.textcolor = tw.cm.alloc_color('black') + tw.msgcolor = tw.cm.alloc_color('black') + tw.fgcolor = tw.cm.alloc_color('red') + tw.textcolor = tw.cm.alloc_color('blue') tw.sprites = [] tw.selected_block = None tw.draggroup = None + prep_selectors(tw) + for s in selectors: +# gobject.idle_add(setup_selectors,tw,s) + setup_selectors(tw,s) + tw.loaded = False +# gobject.idle_add(setup_misc, tw, tboxh) + setup_misc(tw) tw.step_time = 0 - setup_selectors(tw) - setup_toolbar(tw) + tw.hide = False + tw.palette = True select_category(tw, tw.selbuttons[0]) - tw.turtle = tNew(tw,width,height) + tw.turtle = tNew(tw,tw.width,tw.height) tw.lc = lcNew(tw) - tw.load_save_folder = os.path.join(path,'samples') - tw.save_folder = None - tw.save_file_name = None - return tw - # # Button Press @@ -96,8 +132,6 @@ def buttonpress_cb(win, event, tw): if spr==None: return True if spr.type == 'selbutton': select_category(tw,spr) - elif spr.type == 'tool': - tooldispatch(tw, spr) elif spr.type == 'category': block_selector_pressed(tw,x,y) elif spr.type == 'block': @@ -107,16 +141,29 @@ def buttonpress_cb(win, event, tw): return True def block_selector_pressed(tw,x,y): - if tw.category_spr.image==tw.hidden_palette_icon: - for i in tw.selbuttons: setlayer(i,800) - select_category(tw,tw.selbuttons[0]) + proto = get_proto_from_category(tw,x,y) + if proto==None: return + if proto!='hide': new_block_from_category(tw,proto,x,y) else: - proto = get_proto_from_category(tw,x,y) - if proto==None: return - if proto!='hide': new_block_from_category(tw,proto,x,y) - else: - for i in tw.selbuttons: hide(i) - setshape(tw.category_spr, tw.hidden_palette_icon) + hide_palette(tw) + +def hideshow_palette(tw): + if tw.palette == True: + hide_palette(tw) + # not sure why this call to do_hidepalette doesn't work + tw.activity.projectToolbar.do_hidepalette() + else: + show_palette(tw) + +def show_palette(tw): + for i in tw.selbuttons: setlayer(i,800) + select_category(tw,tw.selbuttons[0]) + tw.palette = True + +def hide_palette(tw): + for i in tw.selbuttons: hide(i) + setshape(tw.category_spr, tw.hidden_palette_icon) + tw.palette = False def get_proto_from_category(tw,x,y): dx,dy = x-tw.category_spr.x, y-tw.category_spr.y, @@ -141,29 +188,22 @@ def new_block_from_category(tw,proto,x,y): tw.dragpos = 20,20 newspr.type = 'block' newspr.proto = proto -# if newspr.proto.name == 'number': newspr.label=100 if tw.defdict.has_key(newspr.proto.name): newspr.label=tw.defdict[newspr.proto.name] newspr.connections = [None]*len(proto.docks) for i in range(len(proto.defaults)): dock = proto.docks[i+1] -# numproto = tw.protodict['number'] -# numdock = numproto.docks[0] -# nx,ny = newspr.x+dock[2]-numdock[2],newspr.y+dock[3]-numdock[3] -# argspr = sprNew(tw,nx,ny,numproto.image) argproto = tw.protodict[tw.valdict[dock[0]]] argdock = argproto.docks[0] nx,ny = newspr.x+dock[2]-argdock[2],newspr.y+dock[3]-argdock[3] argspr = sprNew(tw,nx,ny,argproto.image) argspr.type = 'block' -# argspr.proto = numproto argspr.proto = argproto argspr.label = str(proto.defaults[i]) setlayer(argspr,2000) argspr.connections = [newspr,None] newspr.connections[i+1] = argspr tw.draggroup = findgroup(newspr) -# tw.block_operation = 'move' tw.block_operation = 'new' def block_pressed(tw,event,x,y,spr): @@ -172,10 +212,14 @@ def block_pressed(tw,event,x,y,spr): tw.dragpos = x-newspr.x,y-newspr.y tw.draggroup = findgroup(newspr) else: - tw.dragpos = x-spr.x,y-spr.y tw.draggroup = findgroup(spr) for b in tw.draggroup: setlayer(b,2000) - disconnect(spr) + if spr.connections[0] != None and spr.proto.name == 'lock': + b = find_top_block(spr) + tw.dragpos = x-b.x,y-b.y + else: + tw.dragpos = x-spr.x,y-spr.y + disconnect(spr) def clone_stack(tw,dx,dy,spr): newspr = sprNew(tw,spr.x+dx,spr.y+dy,spr.proto.image) @@ -193,11 +237,11 @@ def clone_stack(tw,dx,dy,spr): def turtle_pressed(tw,x,y): dx,dy = x-tw.turtle.spr.x-30,y-tw.turtle.spr.y-30 - if dx*dx+dy*dy > 200: tw.dragpos = ('turn', tw.turtle.heading-atan2(dy,dx)/DEGTOR,0) + if dx*dx+dy*dy > 200: tw.dragpos = ('turn', \ + tw.turtle.heading-atan2(dy,dx)/DEGTOR,0) else: tw.dragpos = ('move', x-tw.turtle.spr.x,y-tw.turtle.spr.y) tw.draggroup = [tw.turtle.spr] - # # Mouse move # @@ -206,15 +250,18 @@ def move_cb(win, event, tw): if tw.draggroup == None: return True tw.block_operation = 'move' spr = tw.draggroup[0] - x,y = xy(event) if spr.type=='block': + x,y = xy(event) dragx, dragy = tw.dragpos dx,dy = x-dragx-spr.x,y-dragy-spr.y # skip if there was a move of 0,0 if dx == 0 and dy == 0: return True + # drag entire stack if moving lock block + tw.draggroup = findgroup(spr) for b in tw.draggroup: move(b,(b.x+dx, b.y+dy)) elif spr.type=='turtle': + x,y = xy(event) type,dragx,dragy = tw.dragpos if type == 'move': dx,dy = x-dragx-spr.x,y-dragy-spr.y @@ -224,7 +271,6 @@ def move_cb(win, event, tw): seth(tw.turtle, int(dragx+atan2(dy,dx)/DEGTOR+5)/10*10) return True - # # Button release # @@ -234,8 +280,10 @@ def buttonrelease_cb(win, event, tw): spr = tw.draggroup[0] x,y = xy(event) if spr.type == 'turtle': - tw.turtle.xcor = tw.turtle.spr.x-tw.turtle.canvas.x-tw.turtle.canvas.width/2+30 - tw.turtle.ycor = tw.turtle.canvas.height/2-tw.turtle.spr.y+tw.turtle.canvas.y-30 + tw.turtle.xcor = tw.turtle.spr.x-tw.turtle.canvas.x- \ + tw.turtle.canvas.width/2+30 + tw.turtle.ycor = tw.turtle.canvas.height/2-tw.turtle.spr.y+ \ + tw.turtle.canvas.y-30 move_turtle(tw.turtle) tw.draggroup = None return True @@ -245,7 +293,6 @@ def buttonrelease_cb(win, event, tw): return True # allow new blocks to be created by clicking as well as dragging if tw.block_operation=='new': - print "making a new block" for b in tw.draggroup: move(b, (b.x+200, b.y)) snap_to_dock(tw) @@ -259,12 +306,39 @@ def buttonrelease_cb(win, event, tw): tw.firstkey = True elif tw.defdict.has_key(spr.proto.name): tw.selected_block = spr - move(tw.select_mask_string, (spr.x-5,spr.y-5)) - setlayer(tw.select_mask_string, 660) - tw.firstkey = True + if spr.proto.name=='string': + move(tw.select_mask_string, (spr.x-5,spr.y-5)) + setlayer(tw.select_mask_string, 660) + tw.firstkey = True + elif spr.proto.name == 'journal': + import_image(tw, spr) else: run_stack(tw, spr) return True +def import_image(tw, spr): +# chooser = ObjectChooser('Choose image', None, gtk.DIALOG_MODAL | \ +# gtk.DIALOG_DESTROY_WITH_PARENT, 'image/png' ) + chooser = ObjectChooser('Choose image', None, gtk.DIALOG_MODAL | \ + gtk.DIALOG_DESTROY_WITH_PARENT) + try: + result = chooser.run() + if result == gtk.RESPONSE_ACCEPT: + dsobject = chooser.get_selected_object() + load_image(tw, dsobject, spr) + spr.ds_id = dsobject.object_id + dsobject.destroy() + finally: + chooser.destroy() + del chooser + +def load_image(tw, picture, spr): + from talogo import get_pixbuf_from_journal + pixbuf = get_pixbuf_from_journal(picture,spr.width,spr.height) + if pixbuf != None: + setimage(spr, pixbuf) + else: + setimage(spr, tw.media_shapes['texton']) + def snap_to_dock(tw): d=200 me = tw.draggroup[0] @@ -293,36 +367,49 @@ def dock_dx_dy(block1,dock1n,block2,dock2n): d1type,d1dir,d1x,d1y=dock1[0:4] d2type,d2dir,d2x,d2y=dock2[0:4] if (d2type!='num') or (dock2n!=0): - if block1.connections[dock1n] != None: return (100,100) - if block2.connections[dock2n] != None: return (100,100) + if block1.connections[dock1n] != None: + return (100,100) + if block2.connections[dock2n] != None: + return (100,100) if block1==block2: return (100,100) - if d1type!=d2type: return (100,100) - if d1dir==d2dir: return (100,100) + if d1type!=d2type: + # some blocks can take strings or nums + if block1.proto.name in ('write', 'push', 'plus2', 'equal', 'nop'): + if block1.proto.name == 'write' and d1type == 'string': + if d2type == 'num' or d2type == 'string': + pass + else: + if d2type == 'num' or d2type == 'string': + pass + else: + return (100,100) + if d1dir==d2dir: + return (100,100) return (block1.x+d1x)-(block2.x+d2x),(block1.y+d1y)-(block2.y+d2y) def magnitude(pos): x,y = pos return x*x+y*y - # # Repaint # def expose_cb(win, event, tw): -# tw.gc.set_foreground(tw.bgcolor) -# tw.area.draw_rectangle(tw.gc, True, 0, 0, WIDTH, HEIGHT) redrawsprites(tw) return True - # # Keyboard # -def keypress_cb(area, event,tw): +def keypress_cb(area, event, tw): keyname = gtk.gdk.keyval_name(event.keyval) - # print keyname,event.get_state() +# print keyname + ", " + str(event.keyval) + str(event.get_state()) + tw.keypress = keyname +# tw.keyval = unicode(gtk.gdk.keyval_to_unicode(event.keyval)) +# foo = unichr(gtk.gdk.keyval_to_unicode(event.keyval)) +# print foo if (event.get_state()>k.gdk.MOD4_MASK): if keyname=="n": new_project(tw) if keyname=="o": load_file(tw) @@ -330,32 +417,51 @@ def keypress_cb(area, event,tw): if keyname=="k": tw.activity.clear_journal() return True if tw.selected_block==None: return False - keyname = gtk.gdk.keyval_name(event.keyval) - if keyname in ['minus', 'period']: keyname = {'minus': '-', 'period': '.'}[keyname] - if len(keyname)>1: return True - oldnum = tw.selected_block.label + if tw.selected_block.proto.name == 'number': + if keyname in ['minus', 'period']: + keyname = {'minus': '-', 'period': '.'}[keyname] + if len(keyname)>1: return True + else: + try: keyname = { + 'minus': '-', 'period': '.', 'space': ' ', \ + 'parenleft': '(', 'parenright': ')', \ + 'exclam': '!', 'question': '?', 'asterisk': '*', 'at': '@', \ + 'numbersign': '#', \ + 'dollar': '$', 'percent': '%', 'asciicircum': '^', \ + 'ampersand': '&', \ + 'underscore': '_', 'plus': '+', 'equal': '=', 'braceleft': '{', \ + 'braceright': '}', \ + 'comma': ',', 'bracketleft': '[', 'bracketright': ']', \ + 'slash': '/', \ + 'backslash': '\\', 'colon': ':', 'semicolon': ';', \ + 'quotedbl': '\"', \ + 'apostrophe': '\'', 'less': '<', 'greater': '>', \ + 'asciitilde': '~', 'grave': '`', \ + 'bar': '|', 'ntilde': 'ñ', 'Ntilde': 'Ñ', 'aacute': 'á', \ + 'Aacute': 'Á', \ + 'eacute': 'é', 'Eacute': 'É', 'iacute': 'í', 'Iacute': 'Í', \ + 'oacute': 'ó', \ + 'Oacute': 'Ó', 'uacute': 'ú', 'Uacute': 'Ú', 'ccedilla': 'ç', \ + 'Ccedilla': 'Ç' }[keyname] + except: + if len(keyname)>1: + return True + oldnum = tw.selected_block.label selblock=tw.selected_block.proto -# if tw.firstkey: newnum = numcheck(keyname,'0') - if tw.firstkey: newnum = selblock.check(keyname,tw.defdict[selblock.name]) + if tw.firstkey: newnum = selblock.check( \ + keyname,tw.defdict[selblock.name]) else: newnum = oldnum+keyname -# setlabel(tw.selected_block, numcheck(newnum,oldnum)) setlabel(tw.selected_block, selblock.check(newnum,oldnum)) tw.firstkey = False return True -#def numcheck(new, old): -# if new in ['-', '.', '-.']: return new -# if new=='.': return '0.' -# try: float(new); return new -# except ValueError,e : return old - def unselect(tw): - if tw.selected_block.label in ['-', '.', '-.']: select_block.setlabel('0') + if tw.selected_block.label in ['-', '.', '-.']: + select_block.setlabel('0') hide(tw.select_mask) hide(tw.select_mask_string) tw.selected_block = None - # # Block utilities # @@ -368,7 +474,7 @@ def disconnect(b): def run_stack(tw,spr): top = find_top_block(spr) - run_blocks(tw.lc, top, blocks(tw)) + run_blocks(tw.lc, top, blocks(tw), True) gobject.idle_add(doevalstep, tw.lc) def findgroup(b): @@ -378,48 +484,67 @@ def findgroup(b): return group def find_top_block(spr): - while spr.connections[0]!=None: spr=spr.connections[0] - return spr - -def tooldispatch(tw, spr): - if spr.blocktype == 'hideshow': hideshow_blocks(tw,spr) - elif spr.blocktype == 'eraser': runtool(tw, spr, clearscreen, tw.turtle) - elif spr.blocktype == 'stopit': stop_logo(tw) - elif spr.blocktype == 'run': run(tw, spr, 0) - elif spr.blocktype == 'step': run(tw, spr, 2) + b = spr + while b.connections[0]!=None: b=b.connections[0] + return b def runtool(tw, spr, cmd, *args): - setshape(spr,spr.onshape) cmd(*(args)) - gobject.timeout_add(250,setshape,spr,spr.offshape) -def hideshow_blocks(tw,spr): - if spr.image==spr.offshape: - for b in blocks(tw): setlayer(b,100) - setshape(spr,spr.onshape) - else: - for b in blocks(tw): setlayer(b,650) - setshape(spr,spr.offshape) - inval(tw.turtle.canvas) +def eraser_button(tw): + clear(tw.lc) + +def stop_button(tw): + stop_logo(tw) -def run(tw, spr, time): +def runbutton(tw, time): print "you better run, turtle, run!!" - setshape(spr,spr.onshape) + # look for the start block for b in blocks(tw): - if find_block_to_run(tw, b): + if find_start_stack(tw, b): tw.step_time = time run_stack(tw, b) - gobject.timeout_add(250,setshape,spr,spr.offshape) return - setshape(spr,spr.offshape) + # no start block, so run a stack that isn't a hat + for b in blocks(tw): + if find_block_to_run(tw, b): + print "running " + b.proto.name + tw.step_time = time + run_stack(tw, b) + return -# find a stack to run (a stack without a hat) +def hideshow_button(tw): + if tw.hide == False: + for b in blocks(tw): setlayer(b,100) + hide_palette(tw) + hide(tw.select_mask) + hide(tw.select_mask_string) + tw.hide = True + else: + for b in blocks(tw): setlayer(b,650) + show_palette(tw) + tw.hide = False + inval(tw.turtle.canvas) + +# find start stack +def find_start_stack(tw, spr): + top = find_top_block(spr) + if spr.proto.name == 'start': + return True + else: + return False + +# find a stack to run (any stack without a hat) def find_block_to_run(tw, spr): top = find_top_block(spr) if spr == top and spr.proto.name[0:3] != 'hat': return True else: return False -def blocks(tw): return [spr for spr in tw.sprites if spr.type == 'block'] -def xy(event): return map(int, event.get_coords()) + +def blocks(tw): + return [spr for spr in tw.sprites if spr.type == 'block'] + +def xy(event): + return map(int, event.get_coords()) -- cgit v0.9.1