def onDraw(self, render): super(DatePicker, self).onDraw(render) if not self.focus: TextBase.onDraw(self, render, pos=(self.margin[0], self.margin[1], self.width - self.margin[2], self.height - self.margin[3]))
def onDraw(self, render): # draw background super(Text, self).onDraw(render) # draw border if not self.background: self.drawBorder(render, 1, color.black) # draw text TextBase.onDraw(self, render)
def onDraw(self, render): super(Checkbox, self).onDraw(render) # draw check icon t = render.GetTexture(self.checkImg) render.SetTexture(t) render.DrawRect(*self.checkPos) # draw text pos = self.height, 0, self.width, self.height TextBase.onDraw(self, render)
def onDraw(self, render): # draw background super(Progress, self).onDraw(render) # draw progress t = render.GetTexture(self.progressImg, gamma = self.gamma) render.SetTexture(t) margin = self.margin + self.margin2 render.DrawRect(self.margin, self.margin, margin + self.margin2 + (self.width-(margin)*2) * self.progress, self.height-self.margin) # draw text #self.text = '%d%%' %int(self.progress * 100) TextBase.onDraw(self, render)
def onDraw(self, render): # draw background super(Progress, self).onDraw(render) # draw progress t = render.GetTexture(self.progressImg, gamma=self.gamma) render.SetTexture(t) margin = self.margin + self.margin2 render.DrawRect( self.margin, self.margin, margin + self.margin2 + (self.width - (margin) * 2) * self.progress, self.height - self.margin, ) # draw text # self.text = '%d%%' %int(self.progress * 100) TextBase.onDraw(self, render)
def onDraw(self, render): iw, ih = self.imgSize margin = self.margin # draw hight light super(LabelButton, self).onDraw(render) # draw image t = render.GetTexture(self.image) render.SetTexture(t) if self.imageColor != color.white: render.SetColor(*self.imageColor) x = (self.width - iw)/2 render.DrawRect(x, margin[1], x+iw, ih+margin[1]) if self.imageColor != color.white: render.SetColor(*color.white) # draw text tw, th = self.textSize render.Translate(margin[0], min(margin[1] + ih + self.textGap, self.height - th - margin[3])) TextBase.onDraw(self, render, (0, 0, max(iw, tw), th))
def onDraw(self, render): iw, ih = self.imgSize margin = self.margin # draw hight light super(LabelButton, self).onDraw(render) # draw image t = render.GetTexture(self.image) render.SetTexture(t) if self.imageColor != color.white: render.SetColor(*self.imageColor) x = (self.width - iw) / 2 render.DrawRect(x, margin[1], x + iw, ih + margin[1]) if self.imageColor != color.white: render.SetColor(*color.white) # draw text tw, th = self.textSize render.Translate( margin[0], min(margin[1] + ih + self.textGap, self.height - th - margin[3])) TextBase.onDraw(self, render, (0, 0, max(iw, tw), th))
def onDraw(self, render): super(RichEdit, self).onDraw(render) if not self.focus: TextBase.onDraw(self, render, pos = (self.margin[0], self.margin[1], self.width - self.margin[2], self.height - self.margin[3]))
def onDraw(self, render): super(TextButton, self).onDraw(render) TextBase.onDraw(self, render)
def onDraw(self, render): super(Combobox, self).onDraw(render) TextBase.onDraw(self, render)
def onDraw(self, render): super(CheckTextButton, self).onDraw(render) TextBase.onDraw(self, render)