image_button¶
Bases:
bgui.widget.Widget
A clickable image-based button.
Parameters: - parent – the widget’s parent
- name – the name of the widget
- default_image – list containing image data for the default state (‘image’, xcoord, ycoord, xsize, ysize)
- default2_image – list containing image data for a second default state, which is used for toggling (‘image’, xcoord, ycoord, xsize, ysize)
- hover_image – list containing image data for the hover state (‘image’, xcoord, ycoord, xsize, ysize)
- click_image – list containing image data for the click state (‘image’, xcoord, ycoord, xsize, ysize)
- 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