def draw(self):
ui.set_color((.7,.5,.5))
if not self.vert:
path=ui.Path.rounded_rect((self.barvalue-self.barwidth/2.)*self.width,0,self.barwidth*self.width,self.height,self.height*0.1)
else:
path=ui.Path.rounded_rect(0,(self.barvalue-self.barwidth/2.)*self.height,self.width, self.barwidth*self.height,self.width*0.1)
path.fill()
ui.set_color((0.5,.5,.5))
path.stroke()
ui.set_color((0.5,0,0))
if len(self.touches)==1:
ui.set_color((0.7,0.7,0))
path.fill()
elif len(self.touches)==2:
ui.set_color((0.7,0.0,0.7))
path.fill()
评论列表
文章目录