Notifications
BB Notification
- class BBNotification(title, description, title_tokens=(), description_tokens=(), urgency=BBNotificationUrgency.DEFAULT, information_level=BBNotificationLevel.SIM, expand_behavior=BBNotificationExpandBehavior.USER_SETTING, visual_type=BBNotificationVisualType.INFORMATION, auto_delete_reason=BBNotificationAutoDeleteReason.NO_REASON, ui_responses=())
Bases:
objectA notification shown to the player.
- Example usage:
BBNotification( BBLocalizedStringData('I am a title'), BBLocalizedStringData('I am a description') ).show()
- Parameters:
title (BBLocalizedStringData) – The title to show in the notification.
description (BBLocalizedStringData) – The description to show in the notification.
urgency (BBNotificationUrgency, optional) – How urgent the notification will be. Default is Not Urgent. (Setting to URGENT will show orange box)
information_level (BBNotificationLevel, optional) – The level of information of the notification. Default is SIM.
expand_behavior (BBNotificationExpandBehavior, optional) – How the notification should expand. Default is USER_SETTING.
visual_type (BBNotificationVisualType, optional) – How the notification can appear to the player. Default is INFORMATION.
auto_delete_reason (BBNotificationAutoDeleteReason, optional) – The reason for the notification to auto delete itself. Default is NO_REASON.
ui_responses (Tuple[BBDialogReason], optional) – Responses used to create buttons in the notification and act on the results. Default is no buttons.
- show(icon=None, secondary_icon=None)
Show the notification to the player.
- Parameters:
icon (BBIconInfo, optional) – The icon to show in the first icon slot. Default is no Icon.
secondary_icon (BBIconInfo, optional) – The icon to show in the second icon slot. Default is no Icon.
BB Dialog Response
- class BBDialogResponse(*args, **kwargs)
Bases:
UiDialogResponse