system

class bgui.system.System(theme=None)

The main gui system. Add widgets to this and then call the render() method draw the gui.

Parameters:theme – the path to a theme directory
add_animation(animation)

Add the animation to the list of currently running animations

Parameters:animation – The animation
children

The widget’s children

focused_widget

The widget which currently has “focus”

frozen

Whether or not the widget should accept events

move(position, time, callback=None)

Move a widget to a new position over a number of frames

Parameters:
  • positon – The new position
  • time – The time in milliseconds to take doing the move
  • callback – An optional callback that is called when he animation is complete
name

The widget’s name

on_active

The widget’s on_active callback

on_click

The widget’s on_click callback

on_hover

The widget’s on_hover callback

on_mouse_enter

The widget’s on_mouse_enter callback

on_mouse_exit

The widget’s on_mouse_exit callback

on_release

The widget’s on_release callback

parent

The widget’s parent

position

The widget’s position

render()

Renders the GUI system

Return type:None
size

The widget’s size

system

A reference to the system object

update_keyboard(key, is_shifted)

Updates the system’s keyboard data

Parameters:
  • key – the key being input
  • is_shifted – is the shift key held down?
Return type:

None

update_mouse(pos, click_state=0)

Updates the system’s mouse data

Parameters:
  • pos – the mouse position
  • click_state – the current state of the mouse
Return type:

None

visible

Whether or not the widget is visible

z_index

The widget’s z-index. Widget’s with a higher z-index are drawn over those that have a lower z-index

Previous topic

progress_bar

Next topic

text_block

This Page