def create_frame3(self): if dev: print '[main] frame3 objects created' self.main_label_3 = MyLabel(self.frame3, 'Rolling Circle', 0.40, 0.05) self.main_label_3.configure(font=MyFonts['ExtraLargeBold']) self.main_label_3.place(relwidth=0.20) self.animate_button_3 = MyButton(self.frame3, 'Animate', self.animate3, 0.05, fb_rely_secondary) self.frame3_canvas = MyCanvas(self.frame3) self.frame3_cycle = MyCycleButton3( self.frame3, ['Basic', 'Momentum', 'Energy'], [self.scales, self.frame3a, self.frame3b, self.frame3c], 0.85, fb_rely_secondary) self.create_frame3a() self.create_frame3b() self.create_frame3c() self.frame3a.tkraise()
def create_frame2(self): if dev: print '[main] frame2 objects created' self.main_label_2 = MyLabel(self.frame2, 'Rotating Circle', 0.40, 0.05) self.main_label_2.configure(font=MyFonts['ExtraLargeBold']) self.main_label_2.place(relwidth=0.20) self.animate_button_2 = MyButton(self.frame2, 'Animate', self.animate2, 0.05, fb_rely_secondary) self.frame2_canvas = MyCanvas(self.frame2) self.frame2_cycle = MyCycleButton3( self.frame2, ['Basic', 'Momentum', 'Energy'], [self.scales, self.frame2a, self.frame2b, self.frame2c], 0.85, fb_rely_secondary) self.create_frame2a() self.create_frame2b() self.create_frame2c() self.frame2a.tkraise()
def create_frame1(self): if dev: print '[main] frame1 objects created' self.main_label_1 = MyLabel(self.frame1, 'Orbiting Particle', 0.40, 0.05) self.main_label_1.configure(font=MyFonts['ExtraLargeBold']) self.main_label_1.place(relwidth=0.20) self.animate_button_1 = MyButton(self.frame1, 'Animate', self.animate1, 0.05, fb_rely_secondary) self.frame1_canvas = MyCanvas(self.frame1) self.frame1_cycle = MyCycleButton3( self.frame1, ['Basic', 'Momentum', 'Energy'], [self.scales, self.frame1a, self.frame1b, self.frame1c], 0.85, fb_rely_secondary) self.create_frame1a() self.create_frame1b() self.create_frame1c() self.frame1a.tkraise()
def create_end_frame(self): if dev: print '[game] end frame created' self.end_frame = MyFrame(self.game_bf, GrayScale(80)) self.end_label = MyLabel(self.end_frame, 'You have finished the Quiz Game!', 0.25, 0.25) self.end_label.configure(font=MyFonts['ExtraLarge'], bg=GrayScale(80), fg=GrayScale(220)) self.end_label.place(relwidth=0.50, relheight=0.15) self.score_button = MyButton(self.end_frame, 'Calculate Score', self.calc_score, 0.45, 0.45) self.credits_label = MyLabel(self.end_frame, 'Questions by:' '\nLian Chao Hooi', 0.25, 0.85) self.credits_label.configure(bg=GrayScale(80), anchor=N, font=MyFonts['Default']) self.credits_label.place(relwidth=0.50)
def disp_ans_button(self): # creating display answer button for explanation frame self.da = MyButton(self.ef, 'Show Answer', self.disp_ans, 0.65, 0.85)
def next_ques_button(self): # creating next question button for explanation frame self.nq = MyButton(self.ef, 'Next Question', self.next_ques, 0.80, 0.85)
def check_ans_button(self): # creating check answer button for question frame self.cb = MyButton(self.qf, 'Check Answer', self.check_ans, 0.80, 0.85)