def initialize(self): if self.situation.args.sheep: bestiary.wooly_retribution() self.situation.args.sheep = False self.header = gui.make_textbox((250,PAGEMARGIN), "BLASTOSAURUS REX",500, size="title") self.main_menu = gui.make_menu((300,400), [("Initiation","new"), ("Continuation","load"), ("Information","information"), ("Education","encyclopaedia"), ("Termination","quit")],400) self.load_menu = self.prepare_load_menu() self.name_menu = gui.PunchCard((300,400)) self.name_prompt = gui.make_textbox( (300,200), "Punch a card with your name, for the analytical engine:\n", 400, ) self.menu = self.main_menu self.ribbon = chromographs.obtain("flourish/ribbon-white.png") phonographs.orchestrate("intromusic.ogg")
def draw_current_page(self): paint = self.screen.blit self.clear_screen(colour=PAGECOLOUR) title, image, desc = HELP[self.page] if image is None: image = "book.png" self.ribbon = chromographs.obtain("flourish/ribbon-blue.png") titleline = typefaces.prepare_title(title) paint(titleline,(PAGEMARGIN,PAGEMARGIN)) topy = y = titleline.get_rect().height + 2 * PAGEMARGIN x = self.screen.get_size()[0] // 2 chromograph = chromographs.obtain("illustrations/%s"%image) paint(chromograph, (PAGEMARGIN, topy)) paint(self.ribbon,(850,-2)) passage = gui.make_textbox((500,topy+100),desc,500) passage.render(self.screen) self.backbutton.render(self.screen) flip()