Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/block.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-01-20 16:43:50 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-01-20 16:43:50 (GMT)
commitfc67a09064f52fa27446c55ca1d170d6c4268086 (patch)
treea498a3616049f78af45065e52e2cfaf39837a89d /block.py
parent4c261605f09d09bcb89f8f291f383beb6dd0179d (diff)
more label munging
Diffstat (limited to 'block.py')
-rw-r--r--block.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/block.py b/block.py
index 2182eb5..5a875e4 100644
--- a/block.py
+++ b/block.py
@@ -54,10 +54,18 @@ class Blocks:
else:
self.list.insert(i, block)
- def remove_from_list(self,block):
+ def remove_from_list(self, block):
if block in self.list:
self.list.remove(block)
+ #
+ # block and spr utilities
+ #
+ def spr_to_block(self, spr):
+ for b in self.list:
+ if spr = b.spr:
+ return b
+
#
# A class for the individual blocks
#
@@ -83,7 +91,7 @@ class Block:
print "%s (%d %d)" % (name, x, y)
else:
print "%s %s (%d %d)" % (name, labels[0], x, y)
- basic_style = ['forward', 'back', 'left', 'right']
+ basic_style = ['forward', 'back', 'left', 'right', 'seth']
box_style = ['number']
if name in basic_style:
svg = block_factory.SVG()
@@ -104,7 +112,7 @@ class Block:
elif name in box_style:
svg = block_factory.SVG()
svg.set_scale(scale)
- svg.expand(20,0)
+ svg.expand(60,0)
svg.set_gradiant(True)
svg.set_colors(colors)
self.spr = sprites.Sprite(self.blocks.sprites, x, y,