Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/taconstants.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-12-24 19:35:01 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-12-24 19:35:01 (GMT)
commit9b9061f8dbbfef4696226a43285109e3a63146b7 (patch)
treebcdbfbbadef00b9235aaf4e3d879e1b72e675d21 /TurtleArt/taconstants.py
parent2e05bede70d995e2affd57c81a8e4453a8986af6 (diff)
adding luminance block; checking for camera before creating palette entries
Diffstat (limited to 'TurtleArt/taconstants.py')
-rwxr-xr-xTurtleArt/taconstants.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/TurtleArt/taconstants.py b/TurtleArt/taconstants.py
index 4f45663..77ebefb 100755
--- a/TurtleArt/taconstants.py
+++ b/TurtleArt/taconstants.py
@@ -136,7 +136,7 @@ PALETTES = [['clean', 'forward', 'back', 'show', 'left', 'right',
'myfunc1arg', 'userdefined',
'cartesian', 'width', 'height', 'polar', 'addturtle', 'reskin',
'sandwichtop_no_label', 'sandwichbottom'],
- ['kbinput', 'keyboard', 'readpixel', 'see', 'readcamera', 'camera',
+ ['kbinput', 'keyboard', 'readpixel', 'see',
'sound', 'volume', 'pitch'],
['journal', 'audio', 'video', 'description', 'hideblocks',
'showblocks', 'fullscreen', 'savepix', 'savesvg', 'mediawait',
@@ -222,7 +222,8 @@ BOX_STYLE = ['number', 'xcor', 'ycor', 'heading', 'pensize', 'color', 'shade',
'toppos', 'rightpos', 'bottompos', 'width', 'height', 'pop', 'keyboard',
'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'white',
'black', 'titlex', 'titley', 'leftx', 'topy', 'rightx', 'bottomy',
- 'sound', 'volume', 'pitch', 'voltage', 'resistance', 'gray', 'see', 'rfid']
+ 'sound', 'volume', 'pitch', 'voltage', 'resistance', 'gray', 'see', 'rfid',
+ 'luminance']
BOX_STYLE_MEDIA = ['description', 'audio', 'journal', 'video', 'camera']
NUMBER_STYLE = ['plus2', 'product2', 'myfunc']
NUMBER_STYLE_VAR_ARG = ['myfunc1arg', 'myfunc2arg', 'myfunc3arg']
@@ -353,6 +354,7 @@ BLOCK_NAMES = {
'leftx': [_('picture left')],
'less2': ['<'],
'list': ['list'],
+ 'luminance': [_('brightness')],
'mediawait': [_('media wait')],
'minus2': ['–'],
'myfunc': [_('Python'), 'f(x)', 'x'],
@@ -518,6 +520,7 @@ PRIMITIVES = {
'leftx': 'leftx',
'less2': 'less?',
'list': 'bulletlist',
+ 'luminance': 'luminance',
'mediawait': 'mediawait',
'minus2': 'minus',
'myfunc': 'myfunction',
@@ -834,6 +837,7 @@ HELP_STRINGS = {
'leftpos': _("xcor of left of screen"),
'left': _("turns turtle counterclockwise (angle in degrees)"),
'less2': _("logical less-than operator"),
+ 'luminance': _("light level detected by camera"),
'mediawait': _("wait for current video or audio to complete"),
'minus2': _("subtracts bottom numeric input from top numeric input"),
'myfunc': _("a programmable block: used to add advanced math equations, e.g., sin(x)"),