diff options
-rw-r--r-- | TODO | 23 | ||||
-rwxr-xr-x | lessons/en_US/MAKELESSONS | 4 | ||||
-rw-r--r-- | lessons/en_US/bottomrow.lesson | 6 | ||||
-rw-r--r-- | lessons/en_US/bottomrowgame.lesson | 7 | ||||
-rw-r--r-- | lessons/en_US/homerow.lesson | 6 | ||||
-rw-r--r-- | lessons/en_US/homerowgame.lesson | 7 | ||||
-rw-r--r-- | lessons/en_US/intro.lesson | 14 | ||||
-rw-r--r-- | lessons/en_US/leftcapital.lesson | 6 | ||||
-rw-r--r-- | lessons/en_US/leftcapitalgame.lesson | 7 | ||||
-rw-r--r-- | lessons/en_US/rightcapital.lesson | 6 | ||||
-rw-r--r-- | lessons/en_US/rightcapitalgame.lesson | 7 | ||||
-rw-r--r-- | lessons/en_US/toprow.lesson | 6 | ||||
-rw-r--r-- | lessons/en_US/toprowgame.lesson | 7 | ||||
-rw-r--r-- | mainscreen.py | 87 |
14 files changed, 98 insertions, 95 deletions
@@ -1,28 +1,5 @@ Typing Turtle -Notes - -How to handle capitals and punctuation? - -Are capitals and punctuation universal concepts? Certainly for all Roman languages. -Do other languages have capital-like and punctuation-like concepts with different rules? -Is there a generic way that punctuation could just be handled naturally? - It depends on how nicely we want them to work. For example knowing that you put quotes - around words, we can randomly enquote words. Knowing that semicolons, periods and - commas appear after words also allows us to randomly append them. - If we don't care, we can just suggest that a) punctuation be taught after the rest - of the alphabet, and b) native text be given which includes plenty of punctuation. -Is there a generic way that we can handle capitalization? - It would be nice to just be able to capitalize the beginning of any word. - OTOH, acronyms and stuff would be nice to include and those will only come from - wordlists. - -The answer to both: Right now, I think it's best to just encourage expansive word lists. -Note that this means that we have top *stop* stripping non-alpha characters from words -as we read them in! - -BTW, after all that work, when are we going to teach Enter? - First Release + Status message on the main screen. "You unlocked a new lesson!" for example. Eventually have the turtle 'say' it. + Graphical WPM and accuracy meters. diff --git a/lessons/en_US/MAKELESSONS b/lessons/en_US/MAKELESSONS index 29575cc..bcdf899 100755 --- a/lessons/en_US/MAKELESSONS +++ b/lessons/en_US/MAKELESSONS @@ -32,9 +32,9 @@ # Generate the introductory lesson. ../../lessonbuilder --intro-lesson \ --title="Welcome" \ - --desc="Click here to begin your typing adventure." \ + --desc="Click Start Lesson to begin your typing adventure." \ --bronze-wpm=0 --silver-wpm=0 --gold-wpm=0 \ - --bronze-accuracy=25 --silver-accuracy=50 --gold-accuracy=100 \ + --bronze-acc=25 --silver-acc=50 --gold-acc=100 \ --order=0 \ --output=intro.lesson diff --git a/lessons/en_US/bottomrow.lesson b/lessons/en_US/bottomrow.lesson index 0dd489e..e94ffba 100644 --- a/lessons/en_US/bottomrow.lesson +++ b/lessons/en_US/bottomrow.lesson @@ -4,19 +4,19 @@ { "accuracy": 70, "name": "bronze", - "score": 4000, + "score": 3000, "wpm": 15 }, { "accuracy": 80, "name": "silver", - "score": 6000, + "score": 4500, "wpm": 20 }, { "accuracy": 90, "name": "gold", - "score": 10000, + "score": 6000, "wpm": 25 } ], diff --git a/lessons/en_US/bottomrowgame.lesson b/lessons/en_US/bottomrowgame.lesson index 40984c3..e26086f 100644 --- a/lessons/en_US/bottomrowgame.lesson +++ b/lessons/en_US/bottomrowgame.lesson @@ -1,22 +1,23 @@ { "description": "Practice the bottom row keys in this exciting game!\nDon't let any balloons get by!", + "length": 60, "medals": [ { "accuracy": 70, "name": "bronze", - "score": 4000, + "score": 3000, "wpm": 15 }, { "accuracy": 80, "name": "silver", - "score": 6000, + "score": 4500, "wpm": 20 }, { "accuracy": 90, "name": "gold", - "score": 10000, + "score": 6000, "wpm": 25 } ], diff --git a/lessons/en_US/homerow.lesson b/lessons/en_US/homerow.lesson index 4001302..656aff0 100644 --- a/lessons/en_US/homerow.lesson +++ b/lessons/en_US/homerow.lesson @@ -4,19 +4,19 @@ { "accuracy": 70, "name": "bronze", - "score": 4000, + "score": 3000, "wpm": 15 }, { "accuracy": 80, "name": "silver", - "score": 6000, + "score": 4500, "wpm": 20 }, { "accuracy": 90, "name": "gold", - "score": 10000, + "score": 6000, "wpm": 25 } ], diff --git a/lessons/en_US/homerowgame.lesson b/lessons/en_US/homerowgame.lesson index 2dee888..e978ba2 100644 --- a/lessons/en_US/homerowgame.lesson +++ b/lessons/en_US/homerowgame.lesson @@ -1,22 +1,23 @@ { "description": "Practice the home row keys in this exciting game!\nDon't let any balloons get by!", + "length": 60, "medals": [ { "accuracy": 70, "name": "bronze", - "score": 4000, + "score": 3000, "wpm": 15 }, { "accuracy": 80, "name": "silver", - "score": 6000, + "score": 4500, "wpm": 20 }, { "accuracy": 90, "name": "gold", - "score": 10000, + "score": 6000, "wpm": 25 } ], diff --git a/lessons/en_US/intro.lesson b/lessons/en_US/intro.lesson index 10e6dbf..8a00ec6 100644 --- a/lessons/en_US/intro.lesson +++ b/lessons/en_US/intro.lesson @@ -1,22 +1,22 @@ { - "description": "Click here to begin your typing adventure.", + "description": "Click Start Lesson to begin your typing adventure.", "medals": [ { - "accuracy": 70, + "accuracy": 25, "name": "bronze", - "score": 4000, + "score": 3000, "wpm": 0 }, { - "accuracy": 80, + "accuracy": 50, "name": "silver", - "score": 6000, + "score": 4500, "wpm": 0 }, { - "accuracy": 90, + "accuracy": 100, "name": "gold", - "score": 10000, + "score": 6000, "wpm": 0 } ], diff --git a/lessons/en_US/leftcapital.lesson b/lessons/en_US/leftcapital.lesson index eed7334..dc4991c 100644 --- a/lessons/en_US/leftcapital.lesson +++ b/lessons/en_US/leftcapital.lesson @@ -4,19 +4,19 @@ { "accuracy": 70, "name": "bronze", - "score": 4000, + "score": 3000, "wpm": 15 }, { "accuracy": 80, "name": "silver", - "score": 6000, + "score": 4500, "wpm": 20 }, { "accuracy": 90, "name": "gold", - "score": 10000, + "score": 6000, "wpm": 25 } ], diff --git a/lessons/en_US/leftcapitalgame.lesson b/lessons/en_US/leftcapitalgame.lesson index 47c8d94..a4a2848 100644 --- a/lessons/en_US/leftcapitalgame.lesson +++ b/lessons/en_US/leftcapitalgame.lesson @@ -1,22 +1,23 @@ { "description": "Practice the left hand CAPITAL letters!\nDon't let any balloons get by!", + "length": 60, "medals": [ { "accuracy": 70, "name": "bronze", - "score": 4000, + "score": 3000, "wpm": 15 }, { "accuracy": 80, "name": "silver", - "score": 6000, + "score": 4500, "wpm": 20 }, { "accuracy": 90, "name": "gold", - "score": 10000, + "score": 6000, "wpm": 25 } ], diff --git a/lessons/en_US/rightcapital.lesson b/lessons/en_US/rightcapital.lesson index c098bc0..0ede55e 100644 --- a/lessons/en_US/rightcapital.lesson +++ b/lessons/en_US/rightcapital.lesson @@ -4,19 +4,19 @@ { "accuracy": 70, "name": "bronze", - "score": 4000, + "score": 3000, "wpm": 15 }, { "accuracy": 80, "name": "silver", - "score": 6000, + "score": 4500, "wpm": 20 }, { "accuracy": 90, "name": "gold", - "score": 10000, + "score": 6000, "wpm": 25 } ], diff --git a/lessons/en_US/rightcapitalgame.lesson b/lessons/en_US/rightcapitalgame.lesson index 3db35f1..20c8336 100644 --- a/lessons/en_US/rightcapitalgame.lesson +++ b/lessons/en_US/rightcapitalgame.lesson @@ -1,22 +1,23 @@ { "description": "Practice the right hand CAPITAL letters!\nDon't let any balloons get by!", + "length": 60, "medals": [ { "accuracy": 70, "name": "bronze", - "score": 4000, + "score": 3000, "wpm": 15 }, { "accuracy": 80, "name": "silver", - "score": 6000, + "score": 4500, "wpm": 20 }, { "accuracy": 90, "name": "gold", - "score": 10000, + "score": 6000, "wpm": 25 } ], diff --git a/lessons/en_US/toprow.lesson b/lessons/en_US/toprow.lesson index f6742a2..73f42f7 100644 --- a/lessons/en_US/toprow.lesson +++ b/lessons/en_US/toprow.lesson @@ -4,19 +4,19 @@ { "accuracy": 70, "name": "bronze", - "score": 4000, + "score": 3000, "wpm": 15 }, { "accuracy": 80, "name": "silver", - "score": 6000, + "score": 4500, "wpm": 20 }, { "accuracy": 90, "name": "gold", - "score": 10000, + "score": 6000, "wpm": 25 } ], diff --git a/lessons/en_US/toprowgame.lesson b/lessons/en_US/toprowgame.lesson index ce6f444..77024cd 100644 --- a/lessons/en_US/toprowgame.lesson +++ b/lessons/en_US/toprowgame.lesson @@ -1,22 +1,23 @@ { "description": "Practice the top row keys in this exciting game!\nDon't let any balloons get by!", + "length": 60, "medals": [ { "accuracy": 70, "name": "bronze", - "score": 4000, + "score": 3000, "wpm": 15 }, { "accuracy": 80, "name": "silver", - "score": 6000, + "score": 4500, "wpm": 20 }, { "accuracy": 90, "name": "gold", - "score": 10000, + "score": 6000, "wpm": 25 } ], diff --git a/mainscreen.py b/mainscreen.py index d1ae53a..c2cb248 100644 --- a/mainscreen.py +++ b/mainscreen.py @@ -102,16 +102,32 @@ class MainScreen(gtk.VBox): # Build lessons list. self.lessonbox = gtk.HBox() - nexticon = sugar.graphics.icon.Icon(icon_name='go-next') + #nexticon = sugar.graphics.icon.Icon(icon_name='go-next') + #self.nextlessonbtn.add(nexticon) + nextlabel = gtk.Label() + nextlabel.set_markup("<span size='8000'>" + _('Next') + "</span>") + self.nextlessonbtn = gtk.Button() - self.nextlessonbtn.add(nexticon) + self.nextlessonbtn.add(nextlabel) self.nextlessonbtn.connect('clicked', self.next_lesson_clicked_cb) - previcon = sugar.graphics.icon.Icon(icon_name='go-previous') + #previcon = sugar.graphics.icon.Icon(icon_name='go-previous') + #self.prevlessonbtn.add(previcon) + prevlabel = gtk.Label() + prevlabel.set_markup("<span size='8000'>" + _('Previous') + "</span>") + self.prevlessonbtn = gtk.Button() - self.prevlessonbtn.add(previcon) + self.prevlessonbtn.add(prevlabel) self.prevlessonbtn.connect('clicked', self.prev_lesson_clicked_cb) + lessonlabel = gtk.Label() + lessonlabel.set_markup("<span size='12000'>" + _('Start Lesson') + "</span>") + + lessonbtn = gtk.Button() + lessonbtn.add(lessonlabel) + lessonbtn.connect('clicked', self.lesson_clicked_cb) + lessonbtn.modify_bg(gtk.STATE_NORMAL, self.get_colormap().alloc_color('#60b060')) + # Load lessons for this language. bundle_path = sugar.activity.activity.get_bundle_path() code = locale.getlocale(locale.LC_ALL)[0] @@ -133,14 +149,19 @@ class MainScreen(gtk.VBox): self.keyboard_images = keyboard.KeyboardImages() self.keyboard_images.load_images() - lessonscrollbox = gtk.HBox() - lessonscrollbox.set_spacing(10) - lessonscrollbox.pack_start(self.prevlessonbtn, False) - lessonscrollbox.pack_start(self.lessonbox) - lessonscrollbox.pack_start(self.nextlessonbtn, False) + lessonnavbox = gtk.HBox() + lessonnavbox.set_spacing(10) + lessonnavbox.pack_start(self.prevlessonbtn, True) + lessonnavbox.pack_start(lessonbtn, True) + lessonnavbox.pack_start(self.nextlessonbtn, True) + + lessonbox = gtk.VBox() + lessonbox.set_spacing(10) + lessonbox.pack_start(lessonnavbox, False) + lessonbox.pack_start(self.lessonbox) self.pack_start(self.titlescene, False, True, 10) - self.pack_start(lessonscrollbox, True) + self.pack_start(lessonbox, True) self.show_next_lesson() @@ -186,28 +207,27 @@ class MainScreen(gtk.VBox): medal_type = self.activity.data['medals'][lesson['name']]['type'] # Create the lesson button. - label = gtk.Label() - label.set_alignment(0.0, 0.5) - label.set_markup("<span size='16000'><b>" + lesson['name'] + "</b></span>\n" + - "<span size='9000' color='#c0c0c0'>" + lesson['description'] + "</span>") + namelabel = gtk.Label() + namelabel.set_alignment(0.5, 0.5) + namelabel.set_markup("<span size='16000'><b>" + lesson['name'] + "</b></span>") + desclabel = gtk.Label() + desclabel.set_alignment(0.5, 0.5) + desclabel.set_markup("<span size='9000' color='#808080'>" + lesson['description'] + "</span>") if medal_type != 'none': - hint = _('You earned a medal in this lesson! Advance to the next one\nby clicking the arrow button to the right.') + hint = _('You earned a medal in this lesson! Advance to the next one\nby clicking the Next button.') else: hint = '' - hintlabel = gtk.Label() - hintlabel.set_alignment(0.0, 0.8) - hintlabel.set_markup("<span size='8000' color='#c0c040'>" + hint + "</span>") + #hintlabel = gtk.Label() + #hintlabel.set_alignment(0.0, 0.8) + #hintlabel.set_markup("<span size='8000' color='#606020'>" + hint + "</span>") labelbox = gtk.VBox() - labelbox.pack_start(label) - labelbox.pack_start(hintlabel) - - lessonbtn = gtk.Button() - lessonbtn.add(labelbox) - lessonbtn.connect('clicked', self.lesson_clicked_cb) - + labelbox.pack_start(namelabel) + labelbox.pack_start(desclabel) + #labelbox.pack_start(hintlabel) + # Create the medal image. bundle = sugar.activity.activity.get_bundle_path() images = { @@ -217,7 +237,7 @@ class MainScreen(gtk.VBox): 'gold': bundle+'/images/gold-medal.svg' } medalpixbuf = gtk.gdk.pixbuf_new_from_file(images[medal_type]) - medalpixbuf = medalpixbuf.scale_simple(250, 250, gtk.gdk.INTERP_BILINEAR) + medalpixbuf = medalpixbuf.scale_simple(200, 200, gtk.gdk.INTERP_BILINEAR) medalimage = gtk.Image() medalimage.set_from_pixbuf(medalpixbuf) @@ -234,23 +254,24 @@ class MainScreen(gtk.VBox): medalbox.pack_start(medalimage) medalbox.pack_start(medallabel) - medalbtn = gtk.Button() - medalbtn.add(medalbox) - medalbtn.connect('clicked', self.medal_clicked_cb) + #medalbtn = gtk.Button() + #medalbtn.add(medalbox) + #medalbtn.connect('clicked', self.medal_clicked_cb) # Hilite the button in the direction of the first unmedaled lesson. next_index = self.get_next_lesson() if next_index > self.lesson_index: self.nextlessonbtn.modify_bg(gtk.STATE_NORMAL, self.get_colormap().alloc_color('#ff8080')) else: - self.nextlessonbtn.modify_bg(gtk.STATE_NORMAL, self.get_colormap().alloc_color('#808080')) + self.nextlessonbtn.modify_bg(gtk.STATE_NORMAL, self.get_colormap().alloc_color('#40a040')) if next_index < self.lesson_index: self.prevlessonbtn.modify_bg(gtk.STATE_NORMAL, self.get_colormap().alloc_color('#ff8080')) else: - self.prevlessonbtn.modify_bg(gtk.STATE_NORMAL, self.get_colormap().alloc_color('#808080')) + self.prevlessonbtn.modify_bg(gtk.STATE_NORMAL, self.get_colormap().alloc_color('#40a040')) - self.lessonbox.pack_start(lessonbtn, True) - self.lessonbox.pack_start(medalbtn, False) + if medal_type != 'none': + self.lessonbox.pack_start(medalbox, False) + self.lessonbox.pack_start(labelbox, True) self.lessonbox.show_all() |