Dialog¶
-
class
pygamelib.gfx.ui.Dialog(config=None)¶ Bases:
objectDialog is a virtual class that can be subclassed to create actual dialogs.
All classes that inherits from Dialog have the following constraints:
- They need to implement a show() method.
- They are automatically rendered on the second pass by the
Screenobject.
It stores the
UiConfigobject and provide a helper attribute for user inputs.-
__init__(config=None) → None¶ This constructor takes only one parameter.
Parameters: config ( UiConfig.) – The config object.
Methods
__init__([config])This constructor takes only one parameter. show()This is a virtual method, calling it directly will only raise a NotImplementedError. Attributes
configGet and set the config object ( UiConfig).user_inputFacility to store and retrieve the user input. -
show()¶ This is a virtual method, calling it directly will only raise a NotImplementedError. Each class that inheritate Dialog needs to implement show().
-
user_input¶ Facility to store and retrieve the user input.