Line 18: |
Line 18: |
| # block number | | # block number |
| # block name or [block name, block value] | | # block name or [block name, block value] |
− | # x position (depreciated) | + | # x position (deprecated) |
− | # y position (depreciated) | + | # y position (deprecated) |
| # list of connections to other blocks | | # list of connections to other blocks |
| | | |
Line 57: |
Line 57: |
| help_string=_('turns the turtle 180 degrees')) | | help_string=_('turns the turtle 180 degrees')) |
| | | |
− | Next, you need to define what your block will do: def_prim takes 3 arguments: the primitive name, the number of arguments—0 in this case—and the function to call—in this case, the canvas.seth function to set the heading. | + | Next, you need to define what your block will do. def_prim takes 3 arguments: the primitive name, the number of arguments—0 in this case—and the function to call—in this case, the canvas.seth function to set the heading. |
| | | |
| self.tw.lc.def_prim('uturn', 0, | | self.tw.lc.def_prim('uturn', 0, |
Line 70: |
Line 70: |
| that the icons should be the same size (55x55) as the others. (This is | | that the icons should be the same size (55x55) as the others. (This is |
| the default icon size for Sugar toolbars.) | | the default icon size for Sugar toolbars.) |
| + | |
| + | === How to write a plugin === |
| + | |
| + | In Spanish: http://valentinbasel.fedorapeople.org/pdfs/turtle_art.pdf |