bge_utils¶
-
class
bgui.bge_utils.
Layout
(sys, data)¶ Bases:
bgui.widget.Widget
A base layout class to be used with the BGESystem
Parameters: - sys – The BGUI system
- data – User data
-
update
()¶ A function that is called by the system to update the widget (subclasses should override this)
-
class
bgui.bge_utils.
System
(theme=None)¶ Bases:
bgui.system.System
A system that is intended to be used with BGE games
Parameters: theme – the path to a theme directory -
load_layout
(layout, data=None)¶ Load a layout and replace any previously loaded layout
Parameters: - layout – The layout to load (None to have no layouts loaded)
- data – User data to send to the layout’s constructor
-
add_overlay
(overlay, data=None)¶ Add an overlay layout, which sits on top of the currently loaded layout
Parameters: - overlay – The layout to add as an overlay
- data – User data to send to the layout’s constructor
-
remove_overlay
(overlay)¶ Remove an overlay layout by name
Parameters: overlay – the class name of the overlay to remove (this is the same name as the layout used to add the overlay)
-
toggle_overlay
(overlay, data=None)¶ Toggle an overlay (if the overlay is active, remove it, otherwise add it)
Parameters: - overlay – The class name of the layout to toggle
- data – User data to send to the layout’s constructor
-
run
()¶ A high-level method to be run every frame
-