From 6a3eecfae933b26f447c1bdc05d46c57cc9d9523 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sat, 06 Feb 2010 02:47:48 +0000 Subject: unhighlight on run --- (limited to 'tawindow.py') diff --git a/tawindow.py b/tawindow.py index 9c57355..ca378e2 100644 --- a/tawindow.py +++ b/tawindow.py @@ -1884,3 +1884,50 @@ class TurtleArtWindow(): return False else: return True + + def showlabel(self, label, str=''): + if label=='#nostack': + shp = 'nostack' + label='' + elif label=='#noinput': + shp = 'noinput' + label='' + elif label=='#emptyheap': + shp = 'emptyheap' + label='' + elif label=='#emptybox': + shp = 'emptybox' + label='' + elif label=='#nomedia': + shp = 'nomedia' + label='' + elif label=='#nocode': + shp = 'nocode' + label='' + elif label=='#syntaxerror': + shp = 'syntaxerror' + label='' + elif label=='#overflowerror': + shp = 'overflowerror' + label='' + elif label=='#notanumber': + shp = 'overflowerror' + label='' + elif label=='#trace': + shp = 'info' + label = str + else: + shp = 'status' + self.status_spr.set_shape(self.status_shapes[shp]) + self.status_spr.set_label(label) + self.status_spr.set_layer(STATUS_LAYER) + + def calc_position(self, t): + w,h,x,y,dx,dy = TEMPLATES[t] + x *= self.canvas.width + y *= self.canvas.height + w *= (self.canvas.width-x) + h *= (self.canvas.height-y) + dx *= w + dy *= h + return(w,h,x,y,dx,dy) -- cgit v0.9.1