class FilterSlot(Slot): f = True backcol = (150, 150, 200) trans = Img.trans_rect((16, 16), backcol + (128, )) def __init__(self, item, oss=None): self.item = item def render(self, surf, pos, scale): draw.rect(surf, self.backcol, Rect(pos, (scale * 16 + 16, ) * 2)) draw.rect(surf, Colour.darker(self.backcol, 0.9), Rect(pos, (scale * 16 + 15, ) * 2), 2) surf.blit(self.item.img[scale], pos) Img.draw_num(surf, self.q, pos, scale + 1) if not self.q: surf.blit(self.trans[scale], pos)
class ChaosSlot(FilterSlot): backcol = (200, 100, 200) trans = Img.trans_rect((16, 16), backcol + (128, ))