Windows and Dialogs
Windows
EM_WINDOW is the base class for all windows. You use it like an EM_PANEL with two differences: the coordinates you set are absolute screen coordinates and you have to call show instead of adding it to the scene. This applies also to all dialogs.
Dialogs
-
EM_DIALOG
An empty dialog window with a title bar including a close button.
Use: Add your widgets to the dialog with add_widget. Remember to add the title bar height to the position of the widgets.
If you want a modal dialog - a dialog whith total input control - use set_modal (True). -
EM_MESSAGE_DIALOG
A simple dialog to display a message and some buttons.
Use: Use one of the predefined creators to preset the title and image or use make_from_text_image.
Set the buttons which are displayed by the different display_* features.
To react on a click either register on the specific button's clicked_event or on the common button_clicked_event.
After a button is pressed, the dialog window will hide and the corresponding was_*_clicked will be set to True. -
EM_FILE_DIALOG
A file selection dialog.
Use: Handle the button click like in the EM_MESSAGE_DIALOG and use the features is_file_selected, filename and directory to acces the selected file.
After a button is pressed, the dialog window will hide and the corresponding was_*_clicked will be set to True.