frame_button

class bgui.frame_button.FrameButton(parent, name=None, base_color=None, text='', font=None, pt_size=None, aspect=None, size=[1, 1], pos=[0, 0], sub_theme='', options=0)

Bases: bgui.widget.Widget

A clickable frame-based button.

Parameters:
  • parent – the widget’s parent
  • name – the name of the widget
  • base_color – the color of the button
  • 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 (defaults to 30 if None)
  • 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)
  • options – various other options
theme_section = 'FrameButton'
theme_options = {'Color': (0.4, 0.4, 0.4, 1), 'BorderSize': 1, 'BorderColor': (0, 0, 0, 1), 'LabelSubTheme': ''}
text
color