From 27168043cf6d4d94a5b2071e53ad8e6cc22381bc Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 22 Feb 2011 21:56:17 +0000 Subject: added offset to second argument of boolean compares >, < --- (limited to 'TurtleArt/tablock.py') 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) -- cgit v0.9.1