peng3d/gui/text.py
def redraw_label(self):
        """
        Re-draws the text by calculating its position.
        
        Currently, the text will always be centered on the position of the label.
        """
        # Convenience variables
        sx,sy = self.size
        x,y = self.pos
        
        # Label position
        self._label.font_name = self.font_name
        self._label.font_size = self.font_size
        self._label.font_color = self.font_color
        
        self._label.x = int(x+sx/2.)
        self._label.y = int(y+sy/2.)
        self._label.width = self.size[0]
        self._label.height = self.size[1]
        self._label._update()
def redraw_label(self):
        """
        Re-draws the text by calculating its position.
        
        Currently, the text will always be centered on the position of the label.
        """
        # Convenience variables
        sx,sy = self.size
        x,y = self.pos
        
        # Label position
        self._label.font_name = self.font_name
        self._label.font_size = self.font_size
        self._label.font_color = self.font_color
        
        self._label.x = int(x+sx/2.)
        self._label.y = int(y+sy/2.)
        self._label.width = self.size[0]
        self._label.height = self.size[1]
        self._label._update()
Re-draws the text by calculating its position.
        
        Currently, the text will always be centered on the position of the label.