diff options
Diffstat (limited to 'girok/utils/display.py')
-rw-r--r-- | girok/utils/display.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/girok/utils/display.py b/girok/utils/display.py index 563cb6e..7f77c14 100644 --- a/girok/utils/display.py +++ b/girok/utils/display.py @@ -6,7 +6,7 @@ from rich.console import Console from rich.style import Style from rich.text import Text -from girok.constants import DisplayBoxType +from girok.constants import DisplayBoxType, DisplayArrowType console = Console() @@ -14,11 +14,11 @@ console = Console() def center_print(text: str, text_type: DisplayBoxType, wrap: bool = False) -> None: style = Style(color=text_type.text_color_hex, bgcolor=text_type.bg_color_hex) - width = ( - shutil.get_terminal_size().columns // 2 - if wrap - else shutil.get_terminal_size().columns - ) + width = shutil.get_terminal_size().columns // 2 if wrap else shutil.get_terminal_size().columns content = Text(text, style=style) console.print(Align.center(content, style=style, width=width), height=50) + + +def arrow_print(text: str, text_type: DisplayArrowType) -> None: + print(f"[{text_type.value}]> {text}[/{text_type.value}]")
\ No newline at end of file |