Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tawindow.py
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-03-14 01:54:12 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-03-14 01:54:12 (GMT)
commitbde0306a2345bddb991f8107c809136b6b0f5868 (patch)
treedf9b53c63b2e9e9b83b21bc2c35cab91ac8476c0 /TurtleArt/tawindow.py
parente728322cd798fa7c2a2bc121695dbab2075fa175 (diff)
add a label to the remote turtles (experimental); fix bug that prevented colors being set for remote turtles on resume
Diffstat (limited to 'TurtleArt/tawindow.py')
-rw-r--r--TurtleArt/tawindow.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 0113cb3..669d93e 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -1563,6 +1563,17 @@ class TurtleArtWindow():
return True
return False
+ def label_remote_turtle(self, name):
+ ''' Add a label to remote turtles '''
+ turtle = self.turtles.get_turtle(name)
+ if turtle is not None:
+ turtle.label_block = Block(self.block_list,
+ self.sprite_list, 'turtle-label', 0, 0,
+ 'label', [], 1.0,
+ colors=['#A0A0A0', '#C0C0C0'])
+ turtle.label_block.spr.set_label(name)
+ turtle.show()
+
def _move_turtle(self, x, y):
""" Move the selected turtle to (x, y). """
(cx, cy) = self.canvas.canvas.get_xy()