Modal¶
-
class
quest.modal.Modal(game)[source]¶ A modal window is a pop-up that pauses the game until it is resolved. It is called a Modal because it puts the game into a new mode. To write modal subclasses, override text_label_contents() to change what is displayed, option_label_contents() to change the options presented, and choose_option(value) to change what should happen when a value is chosen. When a modal is ready to be closed, it should call self.close() from choose_option.
- Parameters
game – The game which the Modal is part of.
-
class
quest.modal.DialogueModal(game, dialogue)[source]¶ A modal window powered by a Dialogue object.