예제 #1
0
파일: MUI.py 프로젝트: NoNotCar/SpaceX
 def render(self, screen, y, size, rcpos=None):
     for n, s in enumerate(self.inputs.slots):
         s.render(screen, (n * 64, y), 3)
         if rcpos is not None and n == rcpos.x:
             screen.blit(sel[3], (n * 64, y))
     if Research.current_research[self.team]:
         Img.draw_with_num(screen, Research.current_research[self.team].img,
                           Research.rprogs[self.team], ((n + 1) * 64, y), 4)
     draw.rect(screen, self.backcol,
               Rect(0, y + 64,
                    len(self.inputs.slots) * 64, 32))
     if self.progress:
         draw.rect(
             screen, self.pcol,
             Rect(0, y + 64,
                  len(self.inputs.slots) * 64 * self.progress / self.energy,
                  32))
     screen.blit(self.overlay[3], (0, y + 64))
예제 #2
0
파일: MUI.py 프로젝트: NoNotCar/SpaceX
 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)
예제 #3
0
파일: MUI.py 프로젝트: NoNotCar/SpaceX
 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)