def draw(self): for button in self.buttons: button.draw(self.surface) self.mytextbox.draw(self.mypane.content_surface) self.mypane.draw(self.surface) self.inputbox.draw(self.surface) # Inherited draw method from base class, draws onto parent Window.draw(self)
def draw(self): for label in self.labels: label.draw(self.surface) for slider in self.sliders: slider.draw(self.surface) for button in self.buttons: button.draw(self.surface) self.wheel.draw(self.surface) pygame.draw.line(self.surface, (200,200,200), (10,190), (self.width-10, 190)) self.surface.blit(self.current_color_box, (10, 200)) self.custom_colors.draw(self.surface) btn = self.custom_colors.grid[self.custom_selected] zerox = self.custom_colors.x+btn.x # just using vars to zeroy = self.custom_colors.y+btn.y # keep the lines nice and short # manually drawing lines because a for loop is achieves the same thing # in only a couple of lines less but with more resources used pygame.draw.line(self.surface, (0,0,0), (zerox,zeroy), (zerox+23, zeroy),2) pygame.draw.line(self.surface, (0,0,0), (zerox,zeroy), (zerox, zeroy+23),2) pygame.draw.line(self.surface, (0,0,0), (zerox+23,zeroy), (zerox+23, zeroy+24),2) pygame.draw.line(self.surface, (0,0,0), (zerox,zeroy+23), (zerox+23, zeroy+23),2) Window.draw(self)
def draw(self): self.bar.draw() Window.draw(self)