def drawbuildicons(): otypes = sorted(mechanics.costs.items(), key = lambda (k,v): v) for j, (otype, cost) in enumerate(otypes): if status.state.maxmutagen < cost: continue x = settings.layout.buildiconxs[j % len(settings.layout.buildiconxs)] y = settings.layout.meterbottom - getlevel(cost) ghost = status.state.mutagen < cost selected = otype == selectedorgan img = graphics.icon(otype, ghost, selected) rect = img.get_rect(center = (x, y)) iconrects[otype] = rect vista.addoverlay(img, rect)
def draw(self): if self.visible: vista.addoverlay(self.currentimg, self.rect)