diff options
author | Walter Bender <walter@sugarlabs.org> | 2013-05-22 11:48:01 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2013-05-22 11:48:01 (GMT) |
commit | 69a6947cbb2768c1a23fd34f9834afa2390a2ea4 (patch) | |
tree | a31ee8d20a7ae60f439847fbd98fa47cbfac45c2 /TurtleArt/tabasics.py | |
parent | 833041cea08f8719f356bb450a8ed233f00b1329 (diff) |
more adjustments to export of color constants to Logo
Diffstat (limited to 'TurtleArt/tabasics.py')
-rw-r--r-- | TurtleArt/tabasics.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py index 9a921b4..581457b 100644 --- a/TurtleArt/tabasics.py +++ b/TurtleArt/tabasics.py @@ -67,7 +67,7 @@ from gettext import gettext as _ from tapalette import (make_palette, define_logo_function) from talogo import (primitive_dictionary, logoerror) from tautils import (convert, chr_to_ord, round_int, strtype) -from taconstants import (LOGOCOLORDICT, COLORDICT, CONSTANTS) +from taconstants import (COLORDICT, CONSTANTS) def _color_to_num(c): @@ -1382,8 +1382,12 @@ variable')) def _make_constant(self, palette, block_name, label, constant): """ Factory for constant blocks """ - if constant in LOGOCOLORDICT: - value = str(LOGOCOLORDICT[constant]) + if constant in COLORDICT: + if COLORDICT[constant][0] is not None: + value = str(COLORDICT[constant][0]) + else: + # Black or White + value = '0 tasetshade %d' % (COLORDICT[constant][1]) else: value = constant palette.add_block(block_name, |