From 6a4b13bc89d5ba8b527b3f7366c6ca0ad54485ae Mon Sep 17 00:00:00 2001 From: Mike Major Date: Tue, 01 Sep 2009 02:48:06 +0000 Subject: added intro text on 3 pages; changed to rev 1 for posting on a.sl.o --- diff --git a/activity/activity.info b/activity/activity.info index 6a5067a..ddfe52d 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -3,6 +3,6 @@ name = Hop-A-Round bundle_id = org.laptop.HopaRound class = hoparound.HopaRoundActivity icon = hoparound-icon -activity_version = 9 +activity_version = 1 host_version = 1 show_launcher = yes diff --git a/data.py b/data.py index b35b4ba..2d2322b 100644 --- a/data.py +++ b/data.py @@ -21,7 +21,7 @@ import random, math class LevelData(): def __init__(self): - self.question_max = 2 # number of questions in each section (slider, multiple choice & entry) + self.question_max = 3 # number of questions in each section (slider, multiple choice & entry) self.thresh_slider = 0 # if question count matches this number, change to this section self.thresh_mult = self.question_max # if question count matches this number, change to this section self.thresh_entry = 2 * self.question_max # if question count matches this number, change to this section diff --git a/hoparound.py b/hoparound.py index b245939..d6d4b44 100644 --- a/hoparound.py +++ b/hoparound.py @@ -67,6 +67,6 @@ class HopaRoundActivity(activity.Activity): self.ui.answer_correct(self.data) else: self.ui.answer_incorrect(self.data) - gobject.timeout_add(2000, self.ui.clear, self.data) + gobject.timeout_add(2500, self.ui.clear, self.data) self.setup(self.data, self.ui) diff --git a/view.py b/view.py index bf4340d..a557de8 100644 --- a/view.py +++ b/view.py @@ -26,6 +26,7 @@ class Views(): self.user_interaction = gtk.VBox() self.activity = gtk.Notebook() self.activity.set_show_tabs(False) + self.activity.set_size_request(800, 600) self.user_interaction.pack_start(self.activity, False, False, 10) # navigation self.navigation = gtk.HButtonBox() @@ -61,11 +62,20 @@ class Views(): self.introduction = gtk.Notebook() self.introduction.set_show_tabs(False) self.intro_area.pack_start(self.introduction, False, False, 10) - self.intro_tab1 = gtk.Label("intro text") + self.intro_tab1 = gtk.Label() + self.intro_tab1.set_line_wrap(True) + self.intro_tab1.set_size_request(700, 300) + self.intro_tab1.set_markup("When Hoppy brags to his friends, he likes to tell them how many leaves he can eat in one day.\n\n\nWhen he doesn't know the exact number, he estimates.\n\n\nThis is called rounding.") self.introduction.append_page(self.intro_tab1) - self.intro_tab2 = gtk.Label("more intro text") + self.intro_tab2 = gtk.Label() + self.intro_tab2.set_line_wrap(True) + self.intro_tab2.set_size_request(700, 300) + self.intro_tab2.set_markup("Hoppy says there are two rules for rounding numbers:\n\n\n1. If the number you are rounding is followed \n\tby 5, 6, 7, 8 or 9 round the number up.\n\n\tExample: 38 rounded to the nearest ten is 40.\n\n\n2. If the number you are rounding is followed \n\tby 0, 1, 2, 3 or 4 round the number down.\n\n\tExample: 33 rounded to the nearest ten is 30.") self.introduction.append_page(self.intro_tab2) - self.intro_tab3 = gtk.Label("and some more intro text") + self.intro_tab3 = gtk.Label() + self.intro_tab3.set_line_wrap(True) + self.intro_tab3.set_size_request(700, 300) + self.intro_tab3.set_markup("Look at the number 182,727:\n\n\t182,727 rounded to the nearest ten is 182,730\n\t182,727 rounded to the nearest hundred is 182,700\n\t182,727 rounded to the nearest thousand is 183,000\n\t182,727 rounded to the nearest ten thousand is 180,000\n\t182,727 rounded to the nearest hundred thousand is 200,000\n\n\nAll the numbers to the right of the place that you are rounding to become zeros.\n\n\t34 rounded to the nearest ten is 30\n\t4,654 rounded to the nearest hundred is 4,700\n\t986 rounded to the nearest thousand is 1,000\n\t219,526 rounded to the nearest ten thousand is 220,000\n\t742,899 rounded to the nearest hundred thousand is 700,000") self.introduction.append_page(self.intro_tab3) # # create the quiz tab -- cgit v0.9.1