def show(self, n=None, nmax=None): if nmax!=None: self.nmax = nmax if n!=None: self.n = n if self.n > self.nmax: self.n = self.nmax self.set() self.clear() if(self.sens == "V"): self.img = makeImg(self.x, self.ypos, self.path, self.scale) if(self.sens == "H"): self.img = makeImg(self.ypos, self.y, self.path, self.scale) self.img.setColor(1,1,1,0.8)
def __init__(self, maxVal, color="blue"): self.maxVal = float(maxVal) self.val = self.maxVal self.scaleMax = 0.1 self.img = makeImg(0, 0, "img/gui/white.png", (self.scaleMax,1,0.01)) if color == "blue": self.img.setColor(0.4,0.6,0.9) else: self.img.setColor(0.9,0.56,0.4) self.x = 0 self.y = 0
def __init__(self, x, y, color=(1.0,0.3,0.1,1), maxVal=0): self.color = color self.x = x self.y = y self.maxVal = float(maxVal) self.scale = 0.008 self.step = 0.022 self.images = [] for i in range(16): img = makeImg(self.x+self.step*i, self.y, "img/gui/white.png", self.scale) img.setColor(self.color[0], self.color[1], self.color[2]) self.images.append(img)
def __init__(self, pos = 0, color=(1.0,0.3,0.1,1), maxVal=0): #self.W = base.win.getXSize() #self.H = base.win.getYSize() self.H = 600.0 self.color = color self.x = -160.0/self.H self.maxVal = maxVal self.val = self.maxVal if pos == 0: self.y = -1+30.0/self.H elif pos == 1: self.y = -1+50.0/self.H else: self.y = -1+70.0/self.H self.images = [] for i in range(16): img = makeImg(self.x+20.0/self.H*i, self.y, "img/gui/white.png", 8.0/self.H) img.setColor(self.color[0], self.color[1], self.color[2]) self.images.append(img)