def render(self, screen, y, size, rcpos=None): for x, (i, (p, q)) in enumerate(self.rs): Img.draw_with_num(screen, p.img, q, (x % size.x * 64, y + x // size.x * 64), 4) if rcpos is not None: screen.blit(sel[3], rcpos * 64 + Vector.VectorX(0, y)) selr = self.rs[rcpos.x + rcpos.y * size.x] i, (p, q) = selr l = len(i) offset = (size.x - l - 2) * 32 for x, (item, n) in enumerate(i.items()): Img.draw_with_num(screen, Items.get_item_image(item), n, (offset + x * 64, (size.y - 1) * 64), 4) screen.blit(arrow[3], (offset + l * 64, (size.y - 1) * 64)) Img.draw_with_num(screen, p.img, q, (offset + (l + 1) * 64, (size.y - 1) * 64), 4)
def render(self, screen, y, size, rcpos=None): if Research.current[self.team]: for x, r in enumerate(Research.current[self.team]): if r is Research.current_research[self.team]: draw.rect( screen, (100, 100, 100), Rect(x % size.x * 64, y + x // size.x * 64, 64, 64)) screen.blit(r.img[3], (x % size.x * 64, y + x // size.x * 64)) if rcpos is not None: screen.blit(sel[3], rcpos * 64 + Vector.VectorX(0, y)) selr = Research.current[self.team][rcpos.x + rcpos.y * size.x] l = len(selr.packs) offset = (size.x - l) * 32 for x, p in enumerate(selr.packs): Img.draw_with_num(screen, Items.get_item_image("SP%s" % p), selr.n, (offset + x * 64, (size.y - 1) * 64), 4) else: Img.bcentrex(tfont, "NO RESEARCH AVAILABLE", screen, y - 16)