def draw (self): """I.draw () -> None Draws the ImageButton surface and places its picture and Label on it. """ ButtonBase.draw (self) spacing = StyleInformation.get ("IMAGEBUTTON_SPACING") rect_img = None rect_child = None rect = self.image.get_rect () if self.picture: rect_img = self.picture.get_rect () rect_img.center = rect.center if self.child: rect_img.right -= (self.child.width / 2 + spacing) rect_img.centery = rect.centery self.image.blit (self.picture, rect_img) if self.child: self.child.center = rect.center if self.picture: self.child.left = rect_img.right + spacing rect_child = self.child.rect self.image.blit (self.child.image, rect_child)
def draw(self): """R.draw () -> None Draws the ToggleButton surface and places its Label on it. """ ButtonBase.draw(self) if self.child: self.child.center = self.image.get_rect().center self.image.blit(self.child.image, self.child.rect)
def draw (self): """B.draw () -> None Draws the Button surface and places its Label on it. """ ButtonBase.draw (self) if self.child: self.child.center = self.image.get_rect ().center self.image.blit (self.child.image, self.child.rect)
def draw(self): """C.draw () -> None Draws the RadioButton surface. Creates the visible surface of the RadioButton and places a radio check and its Label on it. """ border_active = base.GlobalStyle.get_border_size \ (self.__class__, self.style, StyleInformation.get ("ACTIVE_BORDER")) ButtonBase.draw(self) if self.child: self.child.centery = self.image.get_rect().centery self.child.x = self.padding + border_active + \ StyleInformation.get ("RADIO_SPACING") + \ StyleInformation.get ("RADIO_SIZE") self.image.blit(self.child.image, self.child.rect)
def draw (self): """C.draw () -> None Draws the RadioButton surface. Creates the visible surface of the RadioButton and places a radio check and its Label on it. """ border_active = base.GlobalStyle.get_border_size \ (self.__class__, self.style, StyleInformation.get ("ACTIVE_BORDER")) ButtonBase.draw (self) if self.child: self.child.centery = self.image.get_rect ().centery self.child.x = self.padding + border_active + \ StyleInformation.get ("RADIO_SPACING") + \ StyleInformation.get ("RADIO_SIZE") self.image.blit (self.child.image, self.child.rect)