Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/talogo.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-10-23 22:37:39 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-10-23 22:37:39 (GMT)
commitb65f43c2573f0f1590c7f07b4e88ca8c01b4e97b (patch)
treee45ca668299e23251cd13579b17a92e0202721e4 /TurtleArt/talogo.py
parent2e0ed7253e7000fbf7bc4cad9ba7f68354cb6003 (diff)
show value of sees and keyboard blocks
Diffstat (limited to 'TurtleArt/talogo.py')
-rw-r--r--TurtleArt/talogo.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py
index fb7e206..cb958e4 100644
--- a/TurtleArt/talogo.py
+++ b/TurtleArt/talogo.py
@@ -43,7 +43,7 @@ from tautils import get_pixbuf_from_journal, movie_media_type, convert, \
from gettext import gettext as _
VALUE_BLOCKS = ['box1', 'box2', 'color', 'shade', 'gray', 'scale', 'pensize',
- 'heading', 'xcor', 'ycor', 'pop']
+ 'heading', 'xcor', 'ycor', 'pop', 'see', 'keyboard']
import logging
_logger = logging.getLogger('turtleart-activity')
@@ -1038,7 +1038,8 @@ class LogoCode:
'KP_Right': 3}[self.tw.keypress]
except:
self.keyboard = 0
- self.tw.keypress = ""
+ self._update_label_value('keyboard', self.keyboard)
+ self.tw.keypress = ''
def _find_value_blocks(self):
self.value_blocks = {}
@@ -1304,7 +1305,9 @@ class LogoCode:
""" Read r, g, b from the canvas and return a corresponding palette
color """
r, g, b, a = self.tw.canvas.get_pixel()
- return self.tw.canvas.get_color_index(r, g, b)
+ color_index = self.tw.canvas.get_color_index(r, g, b)
+ self._update_label_value('see', color_index)
+ return color_index
def read_pixel(self):
""" Read r, g, b, a from the canvas and push b, g, r to the stack """