Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tasprites.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2009-07-22 00:29:46 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2009-07-22 00:29:46 (GMT)
commite493adeb7dafab55109b10ced426d709ac4717fb (patch)
treedfd9476ae1d796f76c536388fa044cc25ef5068b /tasprites.py
parent2322607e86f7f9d5dd336366ca1dc8d3acbdb640 (diff)
deleted: icons/debugon.svg~
deleted: icons/image-saveoff.svg~ deleted: icons/image-saveon.svg~ modified: images/de/myblocks/hat1.svg modified: images/de/myblocks/hat2.svg modified: images/de/myblocks/myblocksgroup.svg modified: images/de/myblocks/stack1.svg modified: images/de/myblocks/stack2.svg modified: images/es/myblocks/myblocksgroup.svg modified: po/TurtleArt.pot modified: tasetup.py modified: tasprites.py
Diffstat (limited to 'tasprites.py')
-rw-r--r--tasprites.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tasprites.py b/tasprites.py
index c92fd45..85993bc 100644
--- a/tasprites.py
+++ b/tasprites.py
@@ -130,13 +130,13 @@ def hit(spr,pos):
+ str(dy) + " " + str(spr.width) + " " + str(spr.height)
return True
-def draw_label(spr, label, myscale, center_flag):
+def draw_label(spr, label, myscale, center_flag, truncate_flag):
fd = pango.FontDescription('Sans')
fd.set_size(int(myscale*spr.tw.scale*pango.SCALE))
if type(label) == str or type(label) == unicode:
mylabel = label.replace("\0"," ")
l = len(mylabel)
- if l > 8:
+ if truncate_flag and l > 8:
pl = spr.tw.window.create_pango_layout("..."+mylabel[l-8:])
else:
pl = spr.tw.window.create_pango_layout(mylabel)
@@ -157,11 +157,11 @@ def draw_label(spr, label, myscale, center_flag):
# used for most things
def draw_label1(spr, label):
- draw_label(spr, label, 7, True)
+ draw_label(spr, label, 7, True, True)
# used for status blocks
def draw_label2(spr, label):
- draw_label(spr, str(label), 9, False)
+ draw_label(spr, str(label), 9, False, False)
# used to get pixel value from mask for category selector
def getpixel(image,x,y):