def create_btn(self, elapsed_time=0.0): self.bigbtn = splashButton() self.add_widget(self.bigbtn) oa.move_to(self.bigbtn, target_pos=self.bigbtn.end_pos) oa.move_to(self.bigbtn.btn_text, target_pos=self.bigbtn.btn_text.end_pos)
def on_pre_leave(self): oa.move_to(self.btn_back, self.btn_back.pos_initial) oa.move_to(self.btn_forward, self.btn_forward.pos_initial) g.sound_controller.play_sound(g.SOUND_SHEET)
def next_frame(self): if self.frame == 1: self.label.clear() oa.fade_out(self.img_f1) #--- self.title.rewrite(g.xml_root[3][2].text, self.write_text_body) oa.move_to(self.img_tapir_ally, self.img_tapir_ally.pos_final) oa.move_to(self.img_tapir_foe, self.img_tapir_foe.pos_final) elif self.frame == 2: oa.move_to(self.img_tapir_ally, self.img_tapir_ally.pos_initial) oa.move_to(self.img_tapir_foe, self.img_tapir_foe.pos_initial) self.label.clear() #--- self.title.rewrite(g.xml_root[3][4].text, self.write_text_body) oa.move_to(self.img_raccoon, self.img_raccoon.p1) oa.fade_in(self.img_raccoon_a3) elif self.frame == 3: self.label.clear() oa.fade_out(self.img_raccoon_a3) #--- self.title.rewrite(g.xml_root[3][6].text, self.write_text_body) oa.move_to(self.img_raccoon, self.img_raccoon.p2) oa.move_to(self.img_fox, self.img_fox.p1) oa.fade_in(self.img_raccoon_a4) elif self.frame == 4: self.label.clear() oa.fade_out(self.img_raccoon_a4) oa.move_to(self.img_fox, self.img_fox.p0) #--- self.img_carp_foe.pos = self.img_carp_ally.p0 #<--- self.title.rewrite(g.xml_root[3][8].text, self.write_text_body) oa.move_to(self.img_carp_foe, self.img_carp_foe.p1) oa.fade_in(self.img_raccoon_a5) elif self.frame == 5: self.label.clear() oa.move_to(self.img_carp_foe, self.img_carp_foe.p2) oa.move_to(self.img_raccoon, self.img_raccoon.p0) oa.fade_out(self.img_raccoon_a5) #--- self.img_carp_ally.pos = self.img_carp_ally.p0 #<--- self.title.rewrite(g.xml_root[3][10].text, self.write_text_body) oa.move_to(self.img_carp_ally, self.img_carp_ally.p1) oa.move_to(self.img_farm_ally, self.img_farm_ally.p1) elif self.frame == 6: self.label.clear() oa.move_to(self.img_farm_ally, self.img_farm_ally.p0) #--- self.img_carp_ally.pos = self.img_carp_ally.p1 #<--- self.title.rewrite(g.xml_root[3][12].text, self.write_text_body) oa.move_to(self.img_carp_ally, self.img_carp_ally.p2) elif self.frame == 7: self.label.clear() #--- self.title.rewrite(g.xml_root[3][14].text, self.write_text_body) oa.move_to(self.img_zone, self.img_zone.p1) oa.fade_in(self.img_zoneX) elif self.frame == 8: self.label.clear() oa.fade_out(self.img_zoneX) #--- self.img_carp_ally.pos = self.img_carp_ally.p2 #<--- self.title.rewrite(g.xml_root[3][16].text, self.write_text_body) oa.move_to(self.img_zone, self.img_zone.p2) oa.move_to(self.img_carp_ally, self.img_carp_ally.p3, self.promote_carp) elif self.frame == 9: self.label.clear() oa.move_to(self.img_zone, self.img_zone.p0) oa.move_to(self.img_carp_ally, self.img_carp_ally.p4) #--- self.title.rewrite(g.xml_root[3][18].text, self.write_text_body) self.img_carp_foe.pos = self.img_carp_foe.p3 oa.move_to(self.img_carp_foe, self.img_carp_foe.p4) oa.move_to(self.img_farm_foe, self.img_farm_foe.p1) if self.frame == 10: oa.fade_out(self.title) oa.fade_out(self.label) self.img_carp_foe.pos = self.img_carp_foe.p4 #<--- oa.move_to(self.img_carp_foe, self.img_carp_foe.p0) oa.move_to(self.img_farm_foe, self.img_farm_foe.p0) self.demote_carp()
def on_enter(self): oa.move_to(self.btn_back, self.btn_back.pos_final) oa.move_to(self.btn_forward, self.btn_forward.pos_final) self.title.rewrite(g.xml_root[3][0].text, self.write_text_body) oa.fade_in(self.img_f1)