text_block¶
- class bgui.text_block.TextBlock(parent, name=None, text='', font=None, pt_size=None, color=None, aspect=None, size=[1, 1], pos=[0, 0], sub_theme='', overflow=1, options=0)¶
Bases: bgui.widget.Widget
Widget for displaying blocks of text
Parameters: - parent – the widget’s parent
- name – the name of the widget
- text – the text to display (this can be changed later via the text property)
- font – the font to use
- pt_size – the point size of the text to draw
- color – the color to use when rendering the font
- aspect – constrain the widget size to a specified aspect ratio
- size – a tuple containing the width and height
- pos – a tuple containing the x and y position
- sub_theme – name of a sub_theme defined in the theme file (similar to CSS classes)
- overflow – how to handle excess text
- options – various other options
- theme_section = 'TextBlock'¶
- theme_options = {'LabelSubTheme': ''}¶
- text¶
The text to display