def draw_menu(self): #main menu draw #ika.Video.Blit(self.face, 11, 25) ika.Map.Render() ika.Video.Blit(self.menu1, 0, 0) ika.Video.Blit(self.menu3, 0, 190) ika.Video.Blit(self.menu4, 100, 190) if self.menuselected == 0: #map ika.Video.Blit(self.mapw, 0, 22) print >> fonts.two(160, 30, align='center'), self.mapname engine.automap.draw_automap(self.mapx, self.mapy) else: ika.Video.Blit(self.menu2, 0, 22) if self.menuselected == 3: #control config self.draw_options() if self.menuselected == 4: #quit print >> fonts.one(50, 100), "Press "+controls.confirm.buttons['key'].value+" to quit the game." x = 10 y = 10 for i, option in enumerate(self.options): #if option in self.enabled: # if i == self.menuselected: # f = fonts.three # else: f = fonts.two #else: # f = fonts.five f = [fonts.five, fonts.two][option in self.enabled] f = [f, fonts.three][i == self.menuselected] print >> f(x, y), option x += (len(option) + 1) * 10 print >> fonts.one(10, 200), 'HEALTH' print >> fonts.tiny(40, 208), '%i/%i' % (engine.player.hp, engine.player.maxhp) print >> fonts.one(10, 216), 'ENERGY' print >> fonts.tiny(40, 224), '%i/%i' % (engine.player.mp, engine.player.maxmp) print >> fonts.one(105, 200), 'TIME:', engine.time
def Draw(self, m): ika.Video.DrawRect(32, 32, 288, 64, ika.RGB(0, 0, 0), 1) print >> fonts.tiny(160, 32, "center"), self.message