Message Log¶
-
class
MessageLog
(rect: Rect, manager: pygame_gui.ui_manager.UIManager)[source]¶ Bases:
scripts.engine.widgets.panel.Panel
Hold text relating to the game’s events, to display to the player. This should be a log of all notable things that have happened. It is recommended that all messages are in the past tense.
-
__init__
(rect: Rect, manager: pygame_gui.ui_manager.UIManager)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
add_message
(message: str)[source]¶ Add message to the message log. Formatting the text is done via a subset of HTML tags. Currently supported tags are: <b></b> or <strong></strong> - to encase bold styled text. <i></i>, <em></em> or <var></var> - to encase italic styled text. <u></u> - to encase underlined text. <a href=’id’></a> - to encase ‘link’ text that can be clicked on to generate events with the id given in href. <body bgcolor=’#FFFFFF’></body> - to change the background colour of encased text. <br> - to start a new line. <font face=’verdana’ color=’#000000’ size=3.5></font> - To set the font, colour and size of encased text.
-