Sets a theme for posting messages. Themes: ["flat", "future", "block", "air", "ice"] Locations: ["top_left", "top_center", "top_right", "bottom_left", "bottom_center", "bottom_right"] max_messages: The limit of concurrent messages to display.
(
self, theme="default", location="default", max_messages="default"
)
| 1724 | self.__add_light_pause() |
| 1725 | |
| 1726 | def set_messenger_theme( |
| 1727 | self, theme="default", location="default", max_messages="default" |
| 1728 | ): |
| 1729 | """Sets a theme for posting messages. |
| 1730 | Themes: ["flat", "future", "block", "air", "ice"] |
| 1731 | Locations: ["top_left", "top_center", "top_right", |
| 1732 | "bottom_left", "bottom_center", "bottom_right"] |
| 1733 | max_messages: The limit of concurrent messages to display.""" |
| 1734 | if not theme: |
| 1735 | theme = "default" # "flat" |
| 1736 | if not location: |
| 1737 | location = "default" # "bottom_right" |
| 1738 | if not max_messages: |
| 1739 | max_messages = "default" # "8" |
| 1740 | else: |
| 1741 | max_messages = str(max_messages) # Value must be in string format |
| 1742 | js_utils.set_messenger_theme( |
| 1743 | self, |
| 1744 | theme=theme, |
| 1745 | location=location, |
| 1746 | max_messages=max_messages, |
| 1747 | ) |
| 1748 | self.__add_light_pause() |
| 1749 | |
| 1750 | def post_message(self, message, duration=None, pause=True, style="info"): |
| 1751 | """Post a message on the screen with Messenger. |