Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2013-04-12 11:40:34 (GMT)
committer Walter Bender <walter.bender@gmail.com>2013-04-12 11:40:34 (GMT)
commitbc44e12f129c4687e56640214219c5fe62a7f291 (patch)
treea8b3867740e34081762c48efb6dbec756b401ab8
parent30e8db1710f3c3f1c0c0054b4e0b89bceb533c62 (diff)
Use sugar style
-rw-r--r--NEWS4
-rwxr-xr-xSpirolaterals.py161
-rw-r--r--[-rwxr-xr-x]activity.py155
-rw-r--r--activity/activity.info3
-rwxr-xr-xactivity/activity.svg4
-rw-r--r--[-rwxr-xr-x]buttons.py0
-rw-r--r--[-rwxr-xr-x]g.py19
-rw-r--r--icons/cyan.svg19
-rw-r--r--icons/green.svg19
-rw-r--r--icons/red.svg19
-rw-r--r--icons/speed-down.svg79
-rw-r--r--icons/speed-up.svg51
-rw-r--r--[-rwxr-xr-x]load_save.py0
-rw-r--r--[-rwxr-xr-x]my_turtle.py15
-rwxr-xr-xsetup.py24
-rw-r--r--[-rwxr-xr-x]slider.py0
-rw-r--r--[-rwxr-xr-x]utils.py0
17 files changed, 495 insertions, 77 deletions
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..04a319c
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,4 @@
+24
+
+* Aggressive Sugar stylizing
+* Handle screen rotation
diff --git a/Spirolaterals.py b/Spirolaterals.py
index 54020b9..00ed7ea 100755
--- a/Spirolaterals.py
+++ b/Spirolaterals.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
# Spirolaterals.py
"""
Copyright (C) 2010 Peter Hewitt
@@ -9,40 +9,69 @@
(at your option) any later version.
"""
-import g,utils,pygame,buttons,my_turtle,random,os,sys,load_save,slider
+import g,utils,pygame,buttons,my_turtle,os,sys,load_save,slider
try:
import gtk
except:
pass
+import logging
class Spirolaterals:
- def __init__(self):
+ def __init__(self, colors, sugar=True):
self.journal=True # set to False if we come in via main()
self.canvas=None # set to the pygame canvas if we come in via activity.py
+ self.colors = colors
+ self.sugar = sugar
+ self.label = None
+ self.cyan_button = None
+ self.pattern = 1
def display(self): # called each loop
if g.big:
- g.screen.fill((0,0,0))
+ g.screen.fill(self.colors[1])
utils.centre_blit(g.screen,g.big_surface,(g.sx(16),g.sy(11.5)))
else:
- g.screen.blit(g.bgd,(g.sx(0),0))
+ if self.sugar:
+ g.screen.fill(self.colors[1])
+ else:
+ g.screen.blit(g.bgd,(g.sx(0),0))
g.screen.blit(g.box,(g.x0,g.y0))
- g.screen.blit(g.box,(g.x1,g.y0))
- utils.centre_blit(g.screen,g.magician,g.magician_c)
+ g.screen.blit(g.box,(g.x1,g.y1))
+ if not self.sugar:
+ utils.centre_blit(g.screen,g.magician,g.magician_c)
self.draw_goal()
utils.centre_blit(g.screen,g.turtle,(g.x0+4*g.dd,g.y0+6*g.dd))
self.tu.draw()
if self.tu.win:
utils.centre_blit(g.screen,g.smiley,(g.sx(16.6),g.sy(2.2)))
- buttons.on('cyan')
+ if self.sugar:
+ self.cyan_button.set_sensitive(True)
+ else:
+ buttons.on('cyan')
+ if not self.journal: utils.save()
self.draw_nos()
- buttons.draw()
- self.slider.draw()
- if g.score>0: utils.display_score()
+ if not self.sugar:
+ buttons.draw()
+ self.slider.draw()
+ if g.score>0:
+ if self.sugar:
+ self.label.set_markup(
+ '<span><big><b> %s</b></big></span>' % (str(g.score)))
+ else:
+ utils.display_score()
utils.display_number1(g.pattern,(g.sx(2.4),g.sy(2)),\
g.font1,utils.BLUE)
+ def set_cyan_button(self, cyan):
+ self.cyan_button = cyan
+
+ def set_label(self, label):
+ self.label = label
+
+ def do_slider(self,value):
+ g.delay = int(value)
+
def do_button(self,bu):
if bu=='cyan':
g.pattern+=1
@@ -50,19 +79,22 @@ class Spirolaterals:
g.help1=0; g.help2=0; self.get_goal()
self.tu.win=False; g.finale=False; g.show_help=False
self.tu.changed=True
- buttons.off('cyan')
+ if self.sugar:
+ self.cyan_button.set_sensitive(False)
+ else:
+ buttons.off('cyan')
self.mouse_1st_no() # to 1st number
elif bu=='black':
self.tu.current=utils.copy_list(g.numbers)
- self.tu.setup(); g.show_help=False
+ self.tu.setup(self.colors[0]); g.show_help=False
elif bu=='green':
g.show_help=False
if self.tu.changed:
self.tu.current=utils.copy_list(g.numbers)
- self.tu.setup(); self.tu.changed=False
+ self.tu.setup(self.colors[0]); self.tu.changed=False
self.tu.running=True
elif self.tu.win or self.tu.crashed:
- self.tu.setup(); self.tu.running=True
+ self.tu.setup(self.colors[0]); self.tu.running=True
else:
if self.tu.step_count==0: self.tu.ms=pygame.time.get_ticks()
self.tu.running=True
@@ -70,7 +102,7 @@ class Spirolaterals:
self.tu.running=False
def do_key(self,key):
- if key in g.CROSS:
+ if key in g.CROSS and not self.sugar:
if utils.mouse_on_img1(g.magician,g.magician_c):
self.help2(); return
bu=buttons.check()
@@ -80,7 +112,10 @@ class Spirolaterals:
if key in g.RIGHT: self.mouse_right(); return
if key in g.LEFT: self.mouse_left(); return
if key in g.SQUARE:
- if buttons.active('cyan'): self.do_button('cyan')
+ if self.sugar and self.cyan_button.get_sensitive():
+ self.do_button('cyan')
+ if not self.sugar and buttons.active('cyan'):
+ self.do_button('cyan')
return
if key in g.TICK: self.change_level(); return
if key==pygame.K_v: g.version_display=not g.version_display; return
@@ -94,21 +129,22 @@ class Spirolaterals:
def mouse_left(self):
bu=''; cx=g.n_cx0; cy=g.n_cy0; c=None
- if utils.mouse_on_img1(g.magician,g.magician_c):
- c=(cx+4*g.n_dx,cy)
- elif buttons.mouse_on('cyan'): self.mouse_magician(); return
- elif buttons.mouse_on('green'):
- if buttons.active('cyan'): bu='cyan'
- else: self.mouse_magician(); return
- elif buttons.mouse_on('red'): bu='green'
- elif buttons.mouse_on('black'): bu='red'
- if bu!='': buttons.set_mouse(bu); return
+ if not self.sugar:
+ if utils.mouse_on_img1(g.magician,g.magician_c):
+ c=(cx+4*g.n_dx,cy)
+ elif buttons.mouse_on('cyan'):
+ self.mouse_magician(); return
+ elif buttons.mouse_on('green'):
+ if buttons.active('cyan'): bu='cyan'
+ else: self.mouse_magician(); return
+ elif buttons.mouse_on('red'): bu='green'
+ elif buttons.mouse_on('black'): bu='red'
+ if bu!='': buttons.set_mouse(bu); return
if c==None:
c=(cx,cy) # default to 1st no.
for i in range(5):
n=g.numbers[i]
if utils.mouse_on_img_rect(g.n[n-1],(cx,cy)):
- if i==0: buttons.set_mouse('black'); return
c=(cx-g.n_dx,cy); break
cx+=g.n_dx
cx,cy=c; cx+=g.sy(.2); cy+=g.sy(1.2); c=cx,cy
@@ -116,16 +152,16 @@ class Spirolaterals:
def mouse_right(self):
bu=''
- if utils.mouse_on_img1(g.magician,g.magician_c):
- bu='green'
- if buttons.active('cyan'): bu='cyan'
- elif buttons.mouse_on('cyan'): bu='green'
- elif buttons.mouse_on('green'): bu='red'
- elif buttons.mouse_on('red'): bu='black'
- if bu!='': buttons.set_mouse(bu); return
+ if not self.sugar:
+ if utils.mouse_on_img1(g.magician,g.magician_c):
+ bu='green'
+ if buttons.active('cyan'): bu='cyan'
+ elif buttons.mouse_on('cyan'): bu='green'
+ elif buttons.mouse_on('green'): bu='red'
+ elif buttons.mouse_on('red'): bu='black'
+ if bu!='': buttons.set_mouse(bu); return
cx=g.n_cx0; cy=g.n_cy0; c=(cx,cy) # default to 1st no.
- if buttons.mouse_on('black'): pass
- else:
+ if not buttons.mouse_on('black'):
for i in range(5):
n=g.numbers[i]
if utils.mouse_on_img_rect(g.n[n-1],(cx,cy)):
@@ -146,7 +182,7 @@ class Spirolaterals:
for j in g.goal:
for k in range(j):
x2=x1+dx; y2=y1+dy
- pygame.draw.line(g.screen,utils.CYAN,(x1,y1),(x2,y2),4)
+ pygame.draw.line(g.screen,self.colors[0],(x1,y1),(x2,y2),4)
x1=x2; y1=y2
if dy==-g.dd: dx=g.dd;dy=0
elif dx==g.dd: dx=0;dy=g.dd
@@ -252,25 +288,40 @@ class Spirolaterals:
while gtk.events_pending(): gtk.main_iteration()
for event in pygame.event.get(): flushing=True
- def run(self):
+ def save_pattern(self):
+ logging.debug('save pattern %d' % (g.pattern))
+ self.pattern = g.pattern
+
+ def restore_pattern(self):
+ g.pattern = self.pattern
+ logging.debug('restore pattern %d' % (g.pattern))
+
+ def g_init(self):
g.init()
+
+ def run(self, restore=False):
+ self.g_init()
if not self.journal: utils.load()
load_save.retrieve()
- g.delay=(3-g.level)*400
+ if restore:
+ self.restore_pattern()
+ else:
+ g.delay=(3-g.level)*400
self.tu=my_turtle.TurtleClass()
self.tu.current=[1,1,1,3,2]
self.get_goal()
if g.pattern==1: self.tu.current=utils.copy_list(g.goal)
- self.tu.setup()
+ self.tu.setup(self.colors[0])
g.numbers=utils.copy_list(self.tu.current)
#buttons
x=g.sx(7.3); y=g.sy(16.5); dx=g.sy(2.6);
- buttons.Button("cyan",(x,y),True); x+=dx
- buttons.off('cyan')
- buttons.Button("green",(x,y),True); x+=dx
- buttons.Button("red",(x,y),True); x+=dx
- buttons.Button("black",(x,y),True); x+=dx
- self.slider=slider.Slider(g.sx(23.5),g.sy(21),3,utils.YELLOW)
+ if not self.sugar:
+ buttons.Button("cyan",(x,y),True); x+=dx
+ buttons.off('cyan')
+ buttons.Button("green",(x,y),True); x+=dx
+ buttons.Button("red",(x,y),True); x+=dx
+ buttons.Button("black",(x,y),True); x+=dx
+ self.slider=slider.Slider(g.sx(23.5),g.sy(21),3,utils.YELLOW)
self.mouse_1st_no() # to 1st number
if self.canvas<>None: self.canvas.grab_focus()
ctrl=False
@@ -298,12 +349,16 @@ class Spirolaterals:
bu=buttons.check()
if bu<>'':
self.do_button(bu); self.flush_queue()
- elif utils.mouse_on_img1(g.magician,g.magician_c):
- self.help2()
- elif utils.mouse_in(g.x1,g.y0,g.x1+g.bw,g.y0+g.bw):
- self.big_pic()
- elif self.slider.mouse():
- g.delay=(3-g.level)*400
+ elif not self.sugar:
+ if utils.mouse_on_img1(g.magician,g.magician_c):
+ self.help2()
+ elif utils.mouse_in(g.x1,g.y0,g.x1+g.bw,g.y0+g.bw):
+ self.big_pic()
+ elif self.slider.mouse():
+ g.delay=(3-g.level)*400
+ else:
+ g.show_help=False
+ self.check_nos(event.button)
else:
g.show_help=False
self.check_nos(event.button)
@@ -337,7 +392,7 @@ class Spirolaterals:
if __name__=="__main__":
pygame.init()
pygame.display.set_mode((1024,768),pygame.FULLSCREEN)
- game=Spirolaterals()
+ game=Spirolaterals(([0, 255, 255], [0, 0, 0]), sugar=False)
game.journal=False
game.run()
pygame.display.quit()
diff --git a/activity.py b/activity.py
index 212b890..69011aa 100755..100644
--- a/activity.py
+++ b/activity.py
@@ -2,31 +2,102 @@
# my standard link between sugar and my activity
from gettext import gettext as _
+import logging
import gtk
-import pygame
+import gobject
+
from sugar.activity import activity
+from sugar.graphics.toolbarbox import ToolbarBox
+from sugar.activity.widgets import ActivityToolbarButton
+from sugar.activity.widgets import StopButton
+from sugar.graphics.toolbarbox import ToolbarButton
from sugar.graphics.toolbutton import ToolButton
-import gobject
+from sugar.graphics import style
+from sugar import profile
+
+import pygame
import sugargame.canvas
+
import load_save
import Spirolaterals
class PeterActivity(activity.Activity):
+ LOWER = 0
+ UPPER = 400
+
def __init__(self, handle):
super(PeterActivity, self).__init__(handle)
+ # Get user's Sugar colors
+ sugarcolors = profile.get_color().to_string().split(',')
+ colors = [[int(sugarcolors[0][1:3], 16),
+ int(sugarcolors[0][3:5], 16),
+ int(sugarcolors[0][5:7], 16)],
+ [int(sugarcolors[1][1:3], 16),
+ int(sugarcolors[1][3:5], 16),
+ int(sugarcolors[1][5:7], 16)]]
+
+ # No sharing
+ self.max_participants = 1
+
# Build the activity toolbar.
- toolbox = activity.ActivityToolbox(self)
- activity_toolbar = toolbox.get_activity_toolbar()
- activity_toolbar.keep.props.visible = False
- activity_toolbar.share.props.visible = False
+ toolbox = ToolbarBox()
+
+ activity_button = ActivityToolbarButton(self)
+ toolbox.toolbar.insert(activity_button, 0)
+ activity_button.show()
+
+ self._add_speed_slider(toolbox.toolbar)
+
+ cyan = ToolButton('cyan')
+ toolbox.toolbar.insert(cyan, -1)
+ cyan.set_tooltip(_('Next pattern'))
+ cyan.connect('clicked', self._button_cb, 'cyan')
+ cyan.set_sensitive(False)
+ cyan.show()
+
+ green = ToolButton('green')
+ toolbox.toolbar.insert(green, -1)
+ green.set_tooltip(_('Draw'))
+ green.connect('clicked', self._button_cb, 'green')
+ green.show()
+
+ red = ToolButton('red')
+ toolbox.toolbar.insert(red, -1)
+ red.set_tooltip(_('Stop'))
+ red.connect('clicked', self._button_cb, 'red')
+ red.show()
+
+ separator = gtk.SeparatorToolItem()
+ separator.props.draw = True
+ toolbox.toolbar.insert(separator, -1)
+ separator.show()
+
+ label = gtk.Label('')
+ label.set_use_markup(True)
+ label.show()
+ labelitem = gtk.ToolItem()
+ labelitem.add(label)
+ toolbox.toolbar.insert(labelitem, -1)
+ labelitem.show()
+
+ separator = gtk.SeparatorToolItem()
+ separator.props.draw = False
+ separator.set_expand(True)
+ toolbox.toolbar.insert(separator, -1)
+ separator.show()
+
+ stop_button = StopButton(self)
+ stop_button.props.accelerator = _('<Ctrl>Q')
+ toolbox.toolbar.insert(stop_button, -1)
+ stop_button.show()
toolbox.show()
self.set_toolbox(toolbox)
# Create the game instance.
- self.game = Spirolaterals.Spirolaterals()
+ self.game = Spirolaterals.Spirolaterals(colors)
# Build the Pygame canvas.
self._pygamecanvas = \
@@ -36,9 +107,26 @@ class PeterActivity(activity.Activity):
self.set_canvas(self._pygamecanvas)
self.game.canvas=self._pygamecanvas
+ gtk.gdk.screen_get_default().connect('size-changed',
+ self.__configure_cb)
+
# Start the game running.
+ self.game.set_cyan_button(cyan)
+ self.game.set_label(label)
+ self._speed_range.set_value(200)
self._pygamecanvas.run_pygame(self.game.run)
+ def __configure_cb(self, event):
+ ''' Screen size has changed '''
+ logging.debug(self._pygamecanvas.get_allocation())
+ pygame.display.set_mode((gtk.gdk.screen_width(),
+ gtk.gdk.screen_height() - style.GRID_CELL_SIZE),
+ pygame.RESIZABLE)
+ self.game.save_pattern()
+ self.game.g_init()
+ self._speed_range.set_value(200)
+ self.game.run(restore=True)
+
def read_file(self, file_path):
try:
f = open(file_path, 'r')
@@ -51,3 +139,56 @@ class PeterActivity(activity.Activity):
f = open(file_path, 'w')
load_save.save(f)
f.close()
+
+ def _button_cb(self, button=None, color=None):
+ self.game.do_button(color)
+
+ def _add_speed_slider(self, toolbar):
+ self._speed_stepper_down = ToolButton('speed-down')
+ self._speed_stepper_down.set_tooltip(_('Slow down'))
+ self._speed_stepper_down.connect('clicked', self._speed_stepper_down_cb)
+ self._speed_stepper_down.show()
+
+ self._adjustment = gtk.Adjustment(
+ 200, self.LOWER, self.UPPER, 25, 100, 0)
+ self._adjustment.connect('value_changed', self._speed_change_cb)
+ self._speed_range = gtk.HScale(self._adjustment)
+ self._speed_range.set_inverted(True)
+ self._speed_range.set_draw_value(False)
+ self._speed_range.set_update_policy(gtk.UPDATE_CONTINUOUS)
+ self._speed_range.set_size_request(120, 15)
+ self._speed_range.show()
+
+ self._speed_stepper_up = ToolButton('speed-up')
+ self._speed_stepper_up.set_tooltip(_('Speed up'))
+ self._speed_stepper_up.connect('clicked', self._speed_stepper_up_cb)
+ self._speed_stepper_up.show()
+
+ self._speed_range_tool = gtk.ToolItem()
+ self._speed_range_tool.add(self._speed_range)
+ self._speed_range_tool.show()
+
+ toolbar.insert(self._speed_stepper_down, -1)
+ toolbar.insert(self._speed_range_tool, -1)
+ toolbar.insert(self._speed_stepper_up, -1)
+ return
+
+ def _speed_stepper_down_cb(self, button=None):
+ new_value = self._speed_range.get_value() + 25
+ if new_value <= self.UPPER:
+ self._speed_range.set_value(new_value)
+ else:
+ self._speed_range.set_value(self.UPPER)
+
+ def _speed_stepper_up_cb(self, button=None):
+ new_value = self._speed_range.get_value() - 25
+ if new_value >= self.LOWER:
+ self._speed_range.set_value(new_value)
+ else:
+ self._speed_range.set_value(self.LOWER)
+
+ def _speed_change_cb(self, button=None):
+ logging.debug(self._adjustment.value)
+ self.game.do_slider(self._adjustment.value)
+ return True
+
diff --git a/activity/activity.info b/activity/activity.info
index 426e042..08bcf47 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,8 +1,9 @@
[Activity]
name = Spirolaterals
-activity_version = 23
+activity_version = 24
host_version = 1
bundle_id = org.laptop.community.Spirolaterals
icon = activity
show_launcher = yes
exec = sugar-activity activity.PeterActivity
+summary = turtle pattern programming challenge
diff --git a/activity/activity.svg b/activity/activity.svg
index 34af930..7032535 100755
--- a/activity/activity.svg
+++ b/activity/activity.svg
@@ -2,8 +2,8 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink " http://www.w3.org/1999/xlink">
- <!ENTITY stroke_color "#FF0000">
- <!ENTITY fill_color "#00FF00">
+ <!ENTITY stroke_color "#010101">
+ <!ENTITY fill_color "#FFFFFF">
]>
<svg
diff --git a/buttons.py b/buttons.py
index 9542796..9542796 100755..100644
--- a/buttons.py
+++ b/buttons.py
diff --git a/g.py b/g.py
index 72347bd..161c5d2 100755..100644
--- a/g.py
+++ b/g.py
@@ -1,5 +1,6 @@
# g.py - spirolaterals globals
import pygame,utils
+import logging
XO=False # affects the pygame.display.set_mode() call only
app='Spirolaterals'; ver='1.0'
@@ -85,6 +86,8 @@ ver='22'
# flush_queue() doesn't use gtk on non-XO
ver='23'
# removed patterns 9 & 10 - now have 122 patterns
+ver='24'
+# sugar style
UP=(264,273)
DOWN=(258,274)
@@ -125,13 +128,17 @@ def init(): # called by main()
pygame.mouse.set_visible(False)
# this activity only
- global x0,y0,x1,goal,steps,pattern,delay,help1,help2,show_help
+ global x0,y0,x1,y1,goal,steps,pattern,delay,help1,help2,show_help
global big,big_surface,score,slider,level,finale,player_surface
global crash_drawn,magician,magician_c
global bgd,box,dd,magician,turtle,crash,smiley,n,n_glow,n_cx0,n_cy0
global n_dx,bw,sparkle
x0=sx(2.0); y0=sy(1.1) # left frame
- x1=sx(16.8) # right frame
+ w,h=screen.get_size()
+ if w > h:
+ x1=sx(16.8); y1=sy(1.1) # right frame
+ else:
+ x1=sx(2.0); y1=sy(17) # right frame
goal=[]
steps=40 # number of steps to draw pic
pattern=1; level=1
@@ -155,8 +162,12 @@ def init(): # called by main()
for i in range(5):
img=utils.load_image(str(i+1)+'.png',True); n.append(img)
img=utils.load_image(str(i+1)+'g.png',True); n_glow.append(img)
- n_cx0=sx(17.4)+n[3].get_width()/2 # "4" is widest
- n_cy0=sy(17); n_dx=sy(2.6)
+ if w > h:
+ n_cx0=sx(17.4)+n[3].get_width()/2 # "4" is widest
+ n_cy0=sy(17); n_dx=sy(2.6)
+ else:
+ n_cx0=sx(2.6)+n[3].get_width()/2 # "4" is widest
+ n_cy0=sy(34); n_dx=sy(2.6)
def sx(f): # scale x function
return f*factor+offset
diff --git a/icons/cyan.svg b/icons/cyan.svg
new file mode 100644
index 0000000..34726c0
--- /dev/null
+++ b/icons/cyan.svg
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="55"
+ height="55"
+ id="svg2"
+ version="1.1">
+ <circle
+ style="fill:#00ffff;stroke:#000000;stroke-width:1px"
+ r='25' cx='27.5' cy='27.5'/>
+</svg>
diff --git a/icons/green.svg b/icons/green.svg
new file mode 100644
index 0000000..a277c91
--- /dev/null
+++ b/icons/green.svg
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="55"
+ height="55"
+ id="svg2"
+ version="1.1">
+ <circle
+ style="fill:#00ff00;stroke:#000000;stroke-width:1px"
+ r='25' cx='27.5' cy='27.5'/>
+</svg>
diff --git a/icons/red.svg b/icons/red.svg
new file mode 100644
index 0000000..6313900
--- /dev/null
+++ b/icons/red.svg
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="55"
+ height="55"
+ id="svg2"
+ version="1.1">
+ <circle
+ style="fill:#ff0000;stroke:#000000;stroke-width:1px"
+ r='25' cx='27.5' cy='27.5'/>
+</svg>
diff --git a/icons/speed-down.svg b/icons/speed-down.svg
new file mode 100644
index 0000000..5e4dc4f
--- /dev/null
+++ b/icons/speed-down.svg
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.1"
+ width="45"
+ height="45"
+ id="svg2">
+ <metadata
+ id="metadata16">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs14" />
+ <g
+ id="g3841">
+ <path
+ d="m 37.15747,28.544755 a 14.777543,12.20339 0 1 1 0.0085,-0.13313"
+ transform="matrix(0.8284927,0.62797117,-0.6397875,0.81319114,19.84214,-9.8222574)"
+ id="path3837"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="m 1.7161017,27.838983 c 0,0 7.7726082,7.403143 12.5847453,9.533898 3.7843,1.675641 8.338357,3.768075 12.20339,2.288136 4.487623,-1.718332 7.8979,-6.715343 8.771187,-11.440678 0.771139,-4.172611 -1.805438,-8.541404 -3.622882,-12.20339 -1.176276,-2.37009 0.950565,-5.921962 3.241526,-7.2457626 2.157523,-1.2466946 5.615946,-0.9387447 7.43644,0.7627119 1.648959,1.5411377 1.717684,4.4908097 1.144068,6.6737287 -0.562593,2.14097 -4.194915,5.148305 -4.194915,5.148305 0,0 2.267876,6.98827 1.716102,10.487288 -0.38966,2.470991 -3.432204,6.673729 -3.432204,6.673729 l 4.004238,5.338983 -31.080509,0 c 0,0 -3.9944694,-3.621538 -5.3389829,-5.911017 C 3.3467496,34.877171 1.7161017,27.838983 1.7161017,27.838983 z"
+ id="path3839"
+ style="fill:#00000f;fill-opacity:0.94117647;stroke:none" />
+ <g
+ id="g3826">
+ <path
+ d="m 15.65625,12.75 c -1.614497,0.07503 -3.199031,0.47309 -4.625,1.21875 -3.2171584,1.682298 -5.0663964,4.857702 -5.5,8.34375 -0.4336036,3.486048 0.5017617,7.345584 2.75,10.75 5.026637,7.611637 14.74017,10.702605 21.5625,7 3.76836,-2.045157 5.923688,-5.78161 6.40625,-9.9375 0.482562,-4.15589 -1.280751,-8.360615 -4.009694,-12.415816 -0.368091,-0.54829 -0.567236,-1.108852 -1.11545,-0.740649 -0.548214,0.368204 0.557466,1.757434 0.925782,2.305572 2.416991,3.591643 2.105181,7.07468 1.699362,10.569643 -0.405819,3.494963 -2.086755,6.399299 -5.09375,8.03125 -5.383434,2.921689 -13.939493,0.403123 -18.3125,-6.21875 C 8.402634,28.716897 7.6488656,25.448019 8,22.625 c 0.3511344,-2.823019 1.7414099,-5.158404 4.1875,-6.4375 4.264326,-2.229878 11.089732,-0.219767 14.5,5.09375 1.467229,2.286079 2.013625,4.849058 1.71875,7 -0.294875,2.150942 -1.366599,3.853459 -3.25,4.78125 -3.143215,1.548391 -8.241768,0.03065 -10.6875,-3.96875 C 13.471552,27.463073 13.139761,25.666045 13.375,24.1875 13.610239,22.708955 14.339282,21.580085 15.65625,21 c 2.017606,-0.888695 5.429216,0.174617 6.90625,2.84375 0.536203,0.968968 0.666077,2.038539 0.5,2.84375 -0.166077,0.805211 -0.509247,1.287144 -1.25,1.53125 -0.790344,0.260449 -2.222528,-0.260859 -2.875,-1.28125 0.396165,0.211311 0.907532,0.186366 1.28125,-0.0625 0.442832,-0.28221 0.823935,-1.006154 0.75,-1.5625 -0.07393,-0.556346 -0.333991,-0.858555 -0.5625,-1.09375 C 19.949233,23.74836 19.600727,23.464135 18.75,23.40625 17.618767,23.329275 16.603975,24.132796 16.28125,25 c -0.322725,0.867204 -0.26448,1.768381 0.0625,2.59375 1.039978,2.62516 3.923993,3.766509 6.25,3 1.607223,-0.529639 2.629832,-1.914547 2.9375,-3.40625 0.307668,-1.491703 0.02295,-3.109236 -0.78125,-4.5625 -2.096066,-3.787779 -6.665914,-5.429873 -10.125,-3.90625 -2.12896,0.937743 -3.407771,2.911492 -3.75,5.0625 -0.342229,2.151008 0.182802,4.522142 1.46875,6.625 3.084666,5.04422 9.353983,7.164155 13.9375,4.90625 2.669439,-1.315005 4.207521,-3.870183 4.59375,-6.6875 0.386229,-2.817317 -0.326466,-5.933908 -2.09375,-8.6875 -3.043856,-4.742614 -8.28151,-7.412576 -13.125,-7.1875 z"
+ id="path3004"
+ style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#ffffff;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
+ <path
+ d="M 38.21875,7.21875 C 35.95345,6.9735924 33.812209,8.3593201 32.375,9.8125 c -2.490546,2.518218 -2.466228,5.943708 -0.78125,8.875 1.46236,2.544015 2.717706,3.361592 3.09375,8.75 0.07947,1.138714 -0.625524,3.710285 -1.71875,6.03125 -1.093226,2.320965 -2.62638,4.445002 -3.59375,4.9375 -2.392028,1.217807 -4.110116,1.526403 -5.8125,1.4375 -1.693346,-0.08843 -3.429295,-0.590662 -5.65625,-1.0625 -0.01025,-0.0027 -0.02104,0.0028 -0.03125,0 -2.598815,-0.700915 -4.12005,-1.970485 -6.3125,-4 C 9.3614341,32.743759 6.5429901,29.963381 1.53125,26.40625 L 0.34375,25.5625 0.5625,27 c 0.5308433,3.495626 1.8826818,7.814991 3.78125,11.3125 0.9492841,1.748754 2.0320067,3.301849 3.25,4.4375 1.2179933,1.135651 2.600235,1.875 4.09375,1.875 l 29.15625,0 c 0.21783,0 0.444419,-0.04184 0.65625,-0.15625 0.211831,-0.114408 0.366429,-0.338618 0.4375,-0.5625 0.142142,-0.447765 0.0028,-0.771185 -0.15625,-1.125 -0.318149,-0.70763 -0.896028,-1.512529 -1.5625,-2.3125 -1.149288,-1.379498 -1.416233,-1.973274 -1.769132,-2.322066 0.259336,-0.27744 0.282091,-0.800053 1.009566,-1.766837 0.918296,-1.220377 1.995652,-2.987282 2.204337,-4.45676 C 41.911315,30.178213 40.976173,27.487413 40.5,25.21875 40.070598,23.17292 39.682733,21.819893 39.59375,21.5 c 0.164132,-0.120276 0.477662,-0.349438 1.03125,-0.78125 0.668584,-0.521513 1.492677,-1.273094 2.21875,-2.375 1.190171,-1.781973 2.388249,-4.213352 1.5625,-6.46875 -0.893257,-2.4397905 -3.537977,-4.3695112 -6.1875,-4.65625 z m -0.125,1.25 c 2.115163,0.2289088 4.444423,1.98486 5.125,3.84375 0.577723,1.577958 -0.307101,3.698059 -1.40625,5.34375 -0.634267,0.96258 -1.337532,1.62576 -1.9375,2.09375 -0.599968,0.46799 -1.062486,0.659566 -1.4375,1.09375 l -0.21875,0.25 0.09375,0.3125 c 0,0 0.502452,1.840884 0.96875,4.0625 0.466298,2.221616 0.400235,4.968932 0.211479,6.298087 -0.14113,0.993782 -0.562604,2.392627 -1.430229,3.545663 -0.867625,1.153036 -1.6875,2 -1.6875,2 l -0.4375,0.4375 0.4375,0.4375 c 0,0 1.602434,1.566281 2.875,3.09375 0.636283,0.763735 1.19712,1.534851 1.40625,2 0.03867,0.08602 0.01982,0.04145 0.03125,0.09375 L 12.242857,42.898979 c -1.078085,-0.01804 -2.098043,-0.451808 -3.1706629,-1.451913 -1.0726195,-1.000105 -2.0946038,-2.219085 -3,-3.88699 -1.5215823,-2.803032 -2.6592949,-5.122684 -3.2980867,-8.124872 3.9138849,2.92622 6.5361144,5.338313 8.4999996,7.15625 C 13.502351,38.654103 14.72746,39.234182 17.59375,40 l 0.03125,0 c 2.189001,0.462262 3.941493,0.994409 5.84375,1.09375 1.902257,0.09934 3.930186,-0.27009 6.46875,-1.5625 1.623389,-0.826485 3.009529,-3.096713 4.15625,-5.53125 1.146721,-2.434537 1.709328,-4.96352 1.84375,-6.65625 0.324053,-4.080679 -1.918846,-6.911125 -3.28125,-9.28125 -1.49034,-2.592688 -1.510078,-5.247798 0.59375,-7.375 1.261429,-1.2754467 3.191004,-2.3976152 4.84375,-2.21875 z"
+ id="path3068"
+ style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#ffffff;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.25;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
+ <path
+ d="m 28.875,4.5625 c -0.571937,0.1470518 -1.128172,0.3953973 -1.625,0.59375 -0.496828,0.1983527 -0.961646,0.3604407 -1.3125,0.40625 -0.350854,0.045809 -0.544204,0.015026 -0.75,-0.15625 0.160497,0.1335718 0.180585,0.2856276 0.1875,0.34375 0.0069,0.058122 3.31e-4,0.060268 0,0.0625 L 24.1875,5.40625 c 0,0 -0.01197,0.088788 -0.03125,0.21875 -0.0096,0.064981 -0.04515,0.1331954 -0.03125,0.25 0.0139,0.1168046 0.08352,0.3354397 0.28125,0.5 0.507753,0.4225842 1.123754,0.5111056 1.6875,0.4375 0.563746,-0.073606 1.110974,-0.2947808 1.625,-0.5 1.028053,-0.4104383 1.943493,-0.2839663 2.5,-0.086479 0.539494,0.1914493 0.850436,1.5104384 1.475893,2.3197706 0.625457,0.8093322 0.507142,1.8005094 0.507142,1.8005094 L 34.40625,8.53125 c 0,0 -0.475639,-0.8067996 -1.15625,-1.6875 C 32.569389,5.9630496 31.727037,4.9737385 30.65625,4.59375 30.04553,4.3770247 29.446937,4.4154482 28.875,4.5625 z"
+ id="path3838"
+ style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#ffffff;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.25;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
+ <path
+ d="M 33.8125,1.71875 33.3125,3 c 0,0 0.597762,0.2401006 1.3125,0.625 0.714738,0.3848994 1.121522,1.4377337 1.384566,1.8197706 0.192864,0.2801096 0.302192,1.2975088 0.435077,2.0336735 C 36.577528,8.2146088 37.1875,8.1875 37.1875,8.1875 l 1.375,-0.09375 c 0,0 -0.07326,-0.6940034 -0.21875,-1.5 C 38.198259,5.7877534 38.007809,4.8796388 37.53125,4.1875 36.984512,3.393433 36.072705,2.8324629 35.28125,2.40625 34.489795,1.9800371 33.8125,1.71875 33.8125,1.71875 z"
+ id="path3840"
+ style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#ffffff;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.372666;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
+ <path
+ d="m 34.4484,1.7218009 a 1.3371958,0.77545426 0 1 1 -2.67439,0 1.3371958,0.77545426 0 1 1 2.67439,0 z"
+ id="path3842"
+ style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 26.425225,6.3040308 a 1.3371958,0.77545426 0 1 1 -2.67439,0 1.3371958,0.77545426 0 1 1 2.67439,0 z"
+ id="path3842-1"
+ style="fill:none;stroke:#ffffff;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 36.202923,12.574111 a 0.84306913,0.84190056 0 1 1 -1.686138,0 0.84306913,0.84190056 0 1 1 1.686138,0 z"
+ id="path3842-1-3"
+ style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 40.005942,11.412268 a 0.84306913,0.84190056 0 1 1 -1.686138,0 0.84306913,0.84190056 0 1 1 1.686138,0 z"
+ id="path3842-1-3-6"
+ style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 34.63698,15.707092 c 0,0 2.686558,1.731732 4.287284,1.016096 1.600727,-0.715636 2.564416,-2.865256 2.564416,-2.865256"
+ id="path3811"
+ style="fill:none;stroke:#ffffff;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ </g>
+</svg>
diff --git a/icons/speed-up.svg b/icons/speed-up.svg
new file mode 100644
index 0000000..c5a46a0
--- /dev/null
+++ b/icons/speed-up.svg
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.0"
+ width="45"
+ height="45"
+ id="svg2"><metadata
+ id="metadata11">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+</metadata>
+<defs
+ id="defs5" />
+
+` <g
+ transform="matrix(1.1250001,0,0,1.1250001,-2.8125005,-2.812502)"
+ id="g3287">
+ <path
+ d="m 37.158177,18.217157 c 0,7.129359 -4.73972,12.908847 -10.586461,12.908847 -5.846741,0 -10.586461,-5.779488 -10.586461,-12.908847 0,-7.129359 4.73972,-12.908847 10.586461,-12.908847 5.846741,0 10.586461,5.779488 10.586461,12.908847 l 0,0 z"
+ transform="matrix(0.9002849,0,0,0.6378505,-7.1526774,12.961276)"
+ id="path3173"
+ style="fill:#ffffff;fill-opacity:1;stroke:none" />
+ <path
+ d="m 37.158177,18.217157 c 0,7.129359 -4.73972,12.908847 -10.586461,12.908847 -5.846741,0 -10.586461,-5.779488 -10.586461,-12.908847 0,-7.129359 4.73972,-12.908847 10.586461,-12.908847 5.846741,0 10.586461,5.779488 10.586461,12.908847 l 0,0 z"
+ transform="matrix(0.34904,-0.8298699,0.4328947,0.1820738,8.5363479,48.352162)"
+ id="path3177"
+ style="fill:#ffffff;fill-opacity:1;stroke:none" />
+ <path
+ d="m 37.158177,18.217157 c 0,7.129359 -4.73972,12.908847 -10.586461,12.908847 -5.846741,0 -10.586461,-5.779488 -10.586461,-12.908847 0,-7.129359 4.73972,-12.908847 10.586461,-12.908847 5.846741,0 10.586461,5.779488 10.586461,12.908847 l 0,0 z"
+ transform="matrix(0.5612942,0.3544048,-0.1085241,0.1718767,9.8942224,-2.0522731)"
+ id="path3179"
+ style="fill:#ffffff;fill-opacity:1;stroke:none" />
+ <path
+ d="m 9.2958401,27.300367 c 0,0 0.6438297,-3.994201 1.6400319,-5.238518 0.833257,-1.040794 2.516695,-1.85759 3.762426,-2.031262 0.9968,-0.138967 2.383402,0.2462 3.280063,0.74836 1.042545,0.583861 2.271254,1.791474 2.894173,2.88653 0.98159,1.725581 1.256974,4.552031 1.736504,6.52142 0.380364,1.562127 0.284039,3.94213 1.157669,5.238518 0.721744,1.071004 2.287173,2.00041 3.473008,2.245082 1.78687,0.368683 4.166897,-1.188245 5.981292,-1.069088 0.84132,0.05525 2.27015,0.05272 2.701229,0.85527 0.272959,0.50817 -0.01689,1.497122 -0.38589,1.924349 -1.388344,1.60742 -4.484134,1.551863 -6.463654,1.924357 -1.54502,0.290727 -3.77056,1.115533 -5.209513,0.427635 -2.191386,-1.047611 -3.11186,-5.248556 -5.016567,-6.842148 C 18.494794,34.59652 17.932313,34.319138 17.495998,34.249421 16.284393,34.055824 14.659189,34.94909 13.444155,34.783964 12.553171,34.662876 11.3895,34.166119 10.646456,33.607971 9.4764934,32.729136 8.0161145,31.200596 7.4628632,29.759263 6.9180297,28.339853 7.0795774,26.166629 7.1734442,24.627654 c 0.04976,-0.815832 0.186147,-1.923803 0.4823635,-2.672713 0.4740893,-1.198617 1.3821263,-2.725983 2.3153404,-3.527981 1.3038139,-1.120492 3.4728879,-2.04627 5.1130389,-2.245079 1.631802,-0.197799 3.828032,0.447353 5.402457,0.962176 1.516337,0.49583 3.246091,2.236482 4.823622,2.351988 0.932208,0.06826 2.407938,-0.152939 2.990646,-0.962177 0.30741,-0.426916 0.343158,-1.344606 0.09647,-1.817445 -0.550654,-1.055475 -2.224944,-1.472146 -3.280064,-1.817445 -1.00539,-0.329024 -2.45155,-0.166363 -3.473007,-0.427634 -0.838456,-0.214462 -1.933408,-0.638591 -2.701229,-1.069086 -1.24629,-0.698755 -2.959159,-1.702648 -3.858898,-2.886529 -0.817776,-1.0760346 -2.317397,-3.0254485 -1.736505,-4.2763406 0.06753,-0.1454133 0.336585,-0.081478 0.482363,-0.1069088 0.748264,-0.1305312 2.147702,0.4174844 2.508284,-0.3207253 0.338874,-0.6937639 -1.483172,-1.7166452 -1.061197,-2.351988 0.851763,-1.2824449 3.329342,0.4862662 4.72715,0.8552682 1.121926,0.2961731 2.62592,0.7305046 3.665953,1.2829032 1.693816,0.8996449 3.826771,2.4399257 5.209512,3.8487057 1.197868,1.2204256 1.98772,3.7643616 3.376536,4.7039756 0.62978,0.426082 1.725087,0.235405 2.411811,0.534543 0.411153,0.179097 0.884057,0.587915 1.254142,0.855267 0.854101,0.61701 2.099953,1.314356 2.797701,2.13817 0.577461,0.681796 0,0.106909 1.447086,2.672714 1.447087,2.565804 1.501279,0.32572 1.832977,2.245079 0,0 -0.32328,1.512069 -0.675307,2.031262 -0.41031,0.605152 -1.195498,1.224871 -1.832977,1.496719 -0.271455,0.11576 -0.68249,0.18483 -0.964724,0.106908 -0.405023,-0.111822 -0.753667,-0.738998 -1.157669,-0.855267 -0.70255,-0.202189 -1.686925,0.255337 -2.411811,0.213817 -0.793655,-0.04546 -1.927833,-0.07316 -2.604757,-0.534543 -0.650834,-0.443601 -1.191753,-1.493431 -1.543559,-2.245079 -0.26551,-0.567275 -0.0089,-2.128616 -0.578834,-2.031262 -0.0286,0.0049 0,0.106909 0,0.106909 m 2.604756,4.383249 c 0,0 -0.67407,3.00661 -0.964725,4.294669 -0.259371,1.14942 -0.38119,2.775651 -0.868252,3.830379 -0.654999,1.418394 -3.087119,4.062526 -3.087119,4.062526 m -0.578834,-7.37669 c 0,0 -0.762223,2.02329 -1.254142,2.779621 -0.526506,0.80951 -1.777805,1.430082 -2.122394,2.351988 -0.01108,0.02963 0,0.106908 0,0.106908 m -3.858898,1.710538 c 0,0 -2.498343,0.09087 -3.56948,0.106905 -0.694537,0.01041 -1.848045,-0.569505 -2.31534,0 -0.410734,0.500573 -0.129138,1.670316 0.192948,2.245079 0.377101,0.672936 1.341866,1.159966 2.025922,1.389809 0.803679,0.270031 1.960108,0.174507 2.797698,0.106913 0.968172,-0.07813 3.18359,-0.641452 3.18359,-0.641452 M 7.3663896,23.237843 c 0,0 -2.1337626,-2.804738 -3.2800638,-2.458896 -0.6495254,0.195963 -0.8281117,1.514613 -0.9647234,2.245079 -0.1645596,0.879906 -0.1889559,2.152344 0.096474,2.993439 0.3548095,1.045538 1.2844064,2.265735 2.1223913,2.88653 0.5024007,0.372186 1.3315344,0.544203 1.9294505,0.641451 0.028634,0.0047 0.096471,0 0.096471,0 M 29.651526,14.04371 c 0,0 -3.058348,-4.1388306 -4.72715,-5.4523336 C 23.678488,7.6107444 21.770009,6.6768097 20.293698,6.2393884 19.086245,5.8816272 16.145385,5.8117543 16.145385,5.8117543 M 35.343402,20.030587 c 0.276872,0.284129 1.079502,0.263788 1.254141,-0.106908 0.264175,-0.56075 -0.52371,-1.415829 -0.964724,-1.817446 -0.473808,-0.431478 -1.46214,-1.188454 -1.929449,-0.748359 -0.380706,0.358535 -0.198367,1.697687 0.289416,1.817445 0.344916,0.08468 0.327116,-1.002886 0.675308,-1.069086 0.245381,-0.04665 0.561385,0.289224 0.675308,0.534543 0.172161,0.370733 -0.276058,1.106519 0,1.389811 z m -0.09647,-0.106908 c 0,0 0,0 0,0 z"
+ id="path2384"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+</g>
+</svg>
diff --git a/load_save.py b/load_save.py
index 9d2ba78..9d2ba78 100755..100644
--- a/load_save.py
+++ b/load_save.py
diff --git a/my_turtle.py b/my_turtle.py
index 421459c..b99d3bc 100755..100644
--- a/my_turtle.py
+++ b/my_turtle.py
@@ -3,15 +3,16 @@ import g,pygame,utils
class TurtleClass: # used only for keeping track of the right hand turtle
- def setup(self):
+ def setup(self, color):
steps=0
for n in self.current: steps=steps+4*n
self.steps=steps
- self.x1=g.x1+4.0*g.dd; self.y1=g.y0+6.0*g.dd; self.dx=0; self.dy=-g.dd
+ self.x1=g.x1+4.0*g.dd; self.y1=g.y1+6.0*g.dd; self.dx=0; self.dy=-g.dd
self.step_count=0
self.ms=pygame.time.get_ticks()
self.running=False; self.crashed=False; self.changed=False
self.win=False
+ self.color=color
def move(self):
if self.step_count<self.steps:
@@ -26,12 +27,12 @@ class TurtleClass: # used only for keeping track of the right hand turtle
self.running=False
def help1(self):
- x1=g.x1+4*g.dd; y1=g.y0+6*g.dd; dx=0; dy=-g.dd; steps=0; angle=0; n=0
+ x1=g.x1+4*g.dd; y1=g.y1+6*g.dd; dx=0; dy=-g.dd; steps=0; angle=0; n=0
for j in self.current:
for k in range(j):
steps+=1
x2=x1+dx; y2=y1+dy
- pygame.draw.line(g.screen,utils.CYAN,(x1,y1),(x2,y2),4)
+ pygame.draw.line(g.screen,self.color,(x1,y1),(x2,y2),4)
x1=x2; y1=y2
if dy==-g.dd: dx=g.dd;dy=0;angle=90
elif dx==g.dd: dx=0;dy=g.dd;angle=180
@@ -43,7 +44,7 @@ class TurtleClass: # used only for keeping track of the right hand turtle
self.step_count=steps
def draw(self):
- x1=g.x1+4*g.dd; y1=g.y0+6*g.dd; dx=0; dy=-g.dd; steps=0; angle=0
+ x1=g.x1+4*g.dd; y1=g.y1+6*g.dd; dx=0; dy=-g.dd; steps=0; angle=0
x2=x1; y2=y1 # in case we haven't moved yet - for turtle image
done=True; n=0
for i in range(4):
@@ -53,7 +54,7 @@ class TurtleClass: # used only for keeping track of the right hand turtle
if not g.show_help:
if steps>self.step_count: done=False; break
x2=x1+dx; y2=y1+dy
- pygame.draw.line(g.screen,utils.CYAN,(x1,y1),(x2,y2),4)
+ pygame.draw.line(g.screen,self.color,(x1,y1),(x2,y2),4)
x1=x2; y1=y2
if not g.show_help:
if steps>self.step_count: break
@@ -72,7 +73,7 @@ class TurtleClass: # used only for keeping track of the right hand turtle
utils.centre_blit(g.screen,img,(x2,y2),angle)
d8=8*g.dd
if not g.show_help:
- if abs(x2-g.x1)<.1 or abs(x2-(g.x1+d8))<.1 or abs(y2-g.y0)<.1 or abs(y2-(g.y0+d8))<.1:
+ if abs(x2-g.x1)<.1 or abs(x2-(g.x1+d8))<.1 or abs(y2-g.y1)<.1 or abs(y2-(g.y1+d8))<.1:
if not self.crashed==True: g.crash_drawn=False
self.running=False; self.crashed=True
elif done:
diff --git a/setup.py b/setup.py
index 77fda74..876cd3f 100755
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,22 @@
-#!/usr/bin/env python
+#!/usr/bin/python
+
+# Copyright (C) 2006, Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
from sugar.activity import bundlebuilder
-if __name__ == "__main__":
- bundlebuilder.start()
+
+bundlebuilder.start()
+
diff --git a/slider.py b/slider.py
index 8968e6f..8968e6f 100755..100644
--- a/slider.py
+++ b/slider.py
diff --git a/utils.py b/utils.py
index 841af65..841af65 100755..100644
--- a/utils.py
+++ b/utils.py