Dialog¶
-
class
pygamelib.gfx.ui.
Dialog
(config=None)¶ Bases:
object
Dialog 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
Screen
object.
It stores the
UiConfig
object 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
config
Get and set the config object ( UiConfig
).user_input
Facility 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.