dialogs.py

No documentation

class DialogBox

Description

RPG-style dialog box with multiple display styles and text animations.
Supports typewriter effect, fade-in, and character-by-character display.

Methods
def __init__(self: Any, x: int, y: int, width: int, height: int, style: Literal['default', 'rpg', 'pokemon', 'modern'] = 'default', theme: ThemeType = None, element_id: Optional[str] = None) -> Any
Initialize a dialog box.

Args:
   x (int): X coordinate position
   y (int): Y coordinate position
   width (int): Width of dialog box
   height (int): Height of dialog box
   style (str): Visual style ("default", "rpg", "pokemon", "modern")
   theme (ThemeType): Theme to use for styling
   element_id (Optional[str]): Custom element ID
def set_text(self: Any, text: str, speaker_name: str = '', instant: bool = False) -> Any
No documentation
def set_animation(self: Any, animation_type: str, speed: int = 30) -> Any
No documentation
def skip_animation(self: Any) -> Any
No documentation
def advance(self: Any) -> Any
No documentation
def set_on_complete(self: Any, callback: Callable) -> Any
No documentation
def set_on_advance(self: Any, callback: Callable) -> Any
No documentation
def update(self: Any, dt: float, inputState: InputState) -> Any
No documentation
def render(self: Any, renderer: Any) -> Any
No documentation
def _render_wrapped_text(self: Any, renderer: Any, x: int, y: int, width: int, height: int, theme: Any) -> Any
No documentation
Back to Ui Module