Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/talogo.py
diff options
context:
space:
mode:
Diffstat (limited to 'talogo.py')
-rw-r--r--talogo.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/talogo.py b/talogo.py
index 1a54be5..bbb91d9 100644
--- a/talogo.py
+++ b/talogo.py
@@ -44,6 +44,9 @@ from tajail import *
from gettext import gettext as _
+from constants import *
+
+
procstop = False
class symbol:
@@ -158,7 +161,7 @@ def readline(lc, line):
return res
def setup_cmd(lc, str):
- lc.tw.turtle.spr.set_layer(100)
+ lc.tw.turtle.spr.set_layer(HIDE_LAYER)
lc.procstop=False
list = readline(lc, str)
lc.step = start_eval(lc, list)
@@ -176,11 +179,11 @@ def evline(lc, list):
lc.arglist = None
while lc.iline:
if lc.tw.step_time > 0:
- lc.tw.turtle.spr.set_layer(630)
+ lc.tw.turtle.spr.set_layer(TURTLE_LAYER)
endtime = millis()+an_int(lc,lc.tw.step_time)*100
while millis()<endtime:
yield True
- lc.tw.turtle.spr.set_layer(100)
+ lc.tw.turtle.spr.set_layer(HIDE_LAYER)
token = lc.iline[0]
if token==lc.symopar: token=lc.iline[1]
icall(lc, eval); yield True
@@ -274,7 +277,7 @@ def debug_trace(lc, token):
shp = 'info'
lc.tw.status_spr.set_shape(lc.tw.status_shapes[shp])
lc.tw.status_spr.set_label(_(my_string))
- lc.tw.status_spr.set_layer(710)
+ lc.tw.status_spr.set_layer(STATUS_LAYER)
return
def undefined_check(lc, token):
@@ -286,11 +289,11 @@ def no_args_check(lc):
raise logoerror("#noinput")
def prim_wait(lc,time):
- lc.tw.turtle.spr.set_layer(630)
+ lc.tw.turtle.spr.set_layer(TURTLE_LAYER)
endtime = millis()+an_int(lc,time*1000)
while millis()<endtime:
yield True
- lc.tw.turtle.spr.set_layer(100)
+ lc.tw.turtle.spr.set_layer(HIDE_LAYER)
ireturn(lc); yield True
def prim_repeat(lc, num, list):
@@ -989,11 +992,11 @@ def doevalstep(lc):
try:
lc.step.next()
except StopIteration:
- lc.tw.turtle.spr.set_layer(630)
+ lc.tw.turtle.spr.set_layer(TURTLE_LAYER)
return False
except logoerror, e:
showlabel(lc, str(e)[1:-1])
- lc.tw.turtle.spr.set_layer(630)
+ lc.tw.turtle.spr.set_layer(TURTLE_LAYER)
return False
return True
@@ -1069,7 +1072,7 @@ def showlabel(lc,label):
shp = 'status'
lc.tw.status_spr.set_shape(lc.tw.status_shapes[shp])
lc.tw.status_spr.set_label(label)
- lc.tw.status_spr.set_layer(710)
+ lc.tw.status_spr.set_layer(STATUS_LAYER)
def stop_logo(tw):
tw.step_time = 0