Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt
diff options
context:
space:
mode:
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/tablock.py5
-rw-r--r--TurtleArt/taconstants.py16
-rw-r--r--TurtleArt/tawindow.py5
3 files changed, 12 insertions, 14 deletions
diff --git a/TurtleArt/tablock.py b/TurtleArt/tablock.py
index 2b485d8..13d6f36 100644
--- a/TurtleArt/tablock.py
+++ b/TurtleArt/tablock.py
@@ -23,7 +23,7 @@ import gtk
from gettext import gettext as _
-from taconstants import CONSTANTS, EXPANDABLE, EXPANDABLE_ARGS, OLD_NAMES, \
+from taconstants import EXPANDABLE, EXPANDABLE_ARGS, OLD_NAMES, CONSTANTS, \
STANDARD_STROKE_WIDTH, BLOCK_SCALE, BOX_COLORS, GRADIENT_COLOR
from tapalette import palette_blocks, block_colors, expandable_blocks, \
content_blocks, block_names, block_primitives, block_styles
@@ -120,7 +120,8 @@ class Block:
""" A class for the individual blocks """
def __init__(self, block_list, sprite_list, name, x, y, type='block',
- values=[], scale=BLOCK_SCALE, colors=['#FF0000', '#A00000']):
+ values=[], scale=BLOCK_SCALE[0],
+ colors=['#FF0000', '#A00000']):
self.block_list = block_list
self.spr = None
self.shapes = [None, None]
diff --git a/TurtleArt/taconstants.py b/TurtleArt/taconstants.py
index adf5a15..54c2d27 100644
--- a/TurtleArt/taconstants.py
+++ b/TurtleArt/taconstants.py
@@ -55,7 +55,7 @@ SELECTOR_WIDTH = 55
ICON_SIZE = 55
GRADIENT_COLOR = "#FFFFFF"
STANDARD_STROKE_WIDTH = 1.0
-BLOCK_SCALE = 2.0
+BLOCK_SCALE = [0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0, 8.0]
PALETTE_SCALE = 1.5
DEFAULT_TURTLE = 'Yertle'
DEFAULT_TURTLE_COLORS = ['#008000', '#00A000']
@@ -74,6 +74,12 @@ XO1 = 'xo1'
XO15 = 'xo1.5'
UNKNOWN = 'unknown'
+CONSTANTS = {'leftpos': None, 'toppos': None, 'rightpos': None,
+ 'bottompos': None, 'width': None, 'height': None, 'red': 0,
+ 'orange': 10, 'yellow': 20, 'green': 40, 'cyan': 50, 'blue': 70,
+ 'purple': 90, 'titlex': None, 'titley': None, 'leftx': None,
+ 'topy': None, 'rightx': None, 'bottomy': None}
+
#
# Blocks that are expandable
#
@@ -103,14 +109,6 @@ BLOCKS_WITH_SKIN = ['journal', 'audio', 'description', 'nop', 'userdefined',
PYTHON_SKIN = ['nop', 'userdefined', 'userdefined2args', 'userdefined3args']
-#
-# These blocks hold constants
-#
-CONSTANTS = {'leftpos': None, 'toppos': None, 'rightpos': None,
- 'bottompos': None, 'width': None, 'height': None, 'red': 0,
- 'orange': 10, 'yellow': 20, 'green': 40, 'cyan': 50, 'blue': 70,
- 'purple': 90, 'titlex': None, 'titley': None, 'leftx': None,
- 'topy': None, 'rightx': None, 'bottomy': None}
#
# Blocks that can interchange strings and numbers for their arguments
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 0aff62e..b5d083f 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -57,8 +57,7 @@ from taconstants import HORIZONTAL_PALETTE, VERTICAL_PALETTE, BLOCK_SCALE, \
MACROS, TOP_LAYER, BLOCK_LAYER, OLD_NAMES, DEFAULT_TURTLE, TURTLE_LAYER, \
CURSOR, EXPANDABLE, COLLAPSIBLE, DEAD_DICTS, DEAD_KEYS, \
TEMPLATES, PYTHON_SKIN, PALETTE_HEIGHT, STATUS_LAYER, OLD_DOCK, \
- EXPANDABLE_ARGS, CONSTANTS, XO1, XO15, UNKNOWN, TITLEXY, \
- CONTENT_ARGS
+ EXPANDABLE_ARGS, XO1, XO15, UNKNOWN, TITLEXY, CONTENT_ARGS, CONSTANTS
from tapalette import palette_names, palette_blocks, expandable_blocks, \
block_names, content_blocks, default_values, special_names, block_styles, \
help_strings
@@ -164,7 +163,7 @@ class TurtleArtWindow():
self.scale = 1.0
self.color_mode = '888' # TODO: Read visual mode from gtk image
- self.block_scale = BLOCK_SCALE
+ self.block_scale = BLOCK_SCALE[3]
self.trash_scale = 0.5
self.myblock = {}
self.python_code = None