Changeset 301 for traintris/tutorial.py


Ignore:
Timestamp:
05/29/2012 01:10:35 PM (3 years ago)
Author:
andefodahl
Message:

Updated tutorial

File:
1 edited

Legend:

Unmodified
Added
Removed
  • traintris/tutorial.py

    r299 r301  
    2626   
    2727    def continueTutorial(self):
    28         self.graphics.drawDialogBox(self.comments["tutorial" + str(self.counter)], self.comments["tutorial" + str(self.counter+1)], pygame.Color("black"))
    29         print self.comments["tutorial" + str(self.counter)]
    30         print self.comments["tutorial" + str(self.counter+1)]
     28        string1 = self.comments["tutorial" + str(self.counter)]
     29        string2 = self.comments["tutorial" + str(self.counter+1)]
     30        if self.counter == 13:
     31            string3 = ""
     32            string4 = ""
     33        else:
     34            string3 = self.comments["tutorial" + str(self.counter+2)]
     35            string4 = self.comments["tutorial" + str(self.counter+3)]
     36        self.graphics.drawDialogBox(string1, string2, string3, string4, pygame.Color(138, 0, 0))
    3137        for button in self.buttonList:
    3238            self.graphics.drawButton(button.text, button.size, button.images, button.mode, button.pos)
     
    4147                    and event.y > button.pos[1] and event.y < button.pos[1]+button.size[1] \
    4248                    and event.type == 'up':
    43                         if button.type == CONSTANTS.CATEGORY and self.counter < 13:
    44                             print "Here as well"
    45                             self.counter += 2
     49                        if button.type == CONSTANTS.CATEGORY and self.counter < 11:
     50                            self.counter += 4
    4651                            self.continueTutorial()
    47                         elif button.type == CONSTANTS.CATEGORY and self.counter > 12:
     52                        elif button.type == CONSTANTS.CATEGORY and self.counter > 10:
    4853                            ev = TutorialEnd()
    4954                            self.evManager.Post(ev)
Note: See TracChangeset for help on using the changeset viewer.