diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-02-22 21:56:17 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-02-22 21:56:17 (GMT) |
commit | 27168043cf6d4d94a5b2071e53ad8e6cc22381bc (patch) | |
tree | d61106528269a4c2c8291d5280dbb9db164288e0 /TurtleArt/tablock.py | |
parent | 169d3c405863525a71fd00c22049b33441db5300 (diff) |
added offset to second argument of boolean compares >, <
Diffstat (limited to 'TurtleArt/tablock.py')
-rw-r--r-- | TurtleArt/tablock.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/TurtleArt/tablock.py b/TurtleArt/tablock.py index 05b95ae..3db3e6e 100644 --- a/TurtleArt/tablock.py +++ b/TurtleArt/tablock.py @@ -35,7 +35,7 @@ from taconstants import EXPANDABLE, EXPANDABLE_BLOCKS, EXPANDABLE_ARGS, \ COLLAPSIBLE_TOP, COLLAPSIBLE_TOP_NO_ARM, COLLAPSIBLE_TOP_NO_LABEL, \ COLLAPSIBLE_TOP_NO_ARM_NO_LABEL, COLLAPSIBLE_BOTTOM, PORTFOLIO_STYLE_2x2, \ PORTFOLIO_STYLE_1x1, PORTFOLIO_STYLE_2x1, PORTFOLIO_STYLE_1x2, \ - STANDARD_STROKE_WIDTH, BOX_COLORS, GRADIENT_COLOR, \ + STANDARD_STROKE_WIDTH, BOX_COLORS, GRADIENT_COLOR, COMPARE_PORCH_STYLE, \ BASIC_STYLE_EXTENDED_VERTICAL, CONSTANTS, INVISIBLE from tasprite_factory import SVG, svg_str_to_pixbuf import sprites @@ -443,6 +443,8 @@ class Block: self._make_number_style_porch(svg) elif self.name in COMPARE_STYLE: self._make_compare_style(svg) + elif self.name in COMPARE_PORCH_STYLE: + self._make_compare_porch_style(svg) elif self.name in BOOLEAN_STYLE: self._make_boolean_style(svg) elif self.name in NOT_STYLE: @@ -706,6 +708,10 @@ class Block: self.svg.docks[2][1]], ['unavailable', False, 0, 0, ')']] + def _make_compare_porch_style(self, svg): + self.svg.set_porch(True) + self._make_compare_style(svg) + def _make_boolean_style(self, svg): self.svg.expand(10 + self.dx + self.ex, self.ey) self._make_block_graphics(svg, self.svg.boolean_and_or) |