-
-
Notifications
You must be signed in to change notification settings - Fork 2
incendium.vision.gui.error
César Román edited this page Apr 30, 2024
·
7 revisions
Display an error-style message box to the user.
Args:
- message (
str
): The message to display in an error box. This will be translated to the selected Locale. - title (
str
): A title for the error box. This will be translated to the selected Locale. Optional. Defaults to "Error". - detail (
str
): Additional text to display. This will be translated to the selected Locale. Optional.
import system.util
from incendium.vision import gui
gui.error("An error occurred!")
# Change Locale to es_MX
system.util.setLocale("es_MX")
gui.error("An error occurred!")
# Assuming we have added translations for the provided terms
# this would produce an Error message reading the following:
# Title: Error
# Message: ¡Ha ocurrido un error!