From 609c6d347006fa5c8123391f67655c445616735e Mon Sep 17 00:00:00 2001 From: Matthew Iverson Date: Thu, 28 Nov 2024 00:51:46 -0500 Subject: [PATCH] Delete Modules/common_ui.py --- Modules/common_ui.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 Modules/common_ui.py diff --git a/Modules/common_ui.py b/Modules/common_ui.py deleted file mode 100644 index 8571061..0000000 --- a/Modules/common_ui.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -import platform -from Assets.ascii_text_prompts import ascii_art, full_ascii_art, infinitei -from Assets.random_tip import get_random_tip_with_color - -def clear_screen(): - # Check the system platform and use the appropriate command - if platform.system().lower() == "windows": - os.system('cls') # Windows command to clear the screen - else: - os.system('clear') # Unix-based (Linux/macOS) command to clear the screen - - -def header(is_main_menu=False): - """ - Displays the header with optional full application details. - :param is_main_menu: Boolean to indicate whether to display full details. - """ - clear_screen() - if is_main_menu: - print(center_text(full_ascii_art)) # Full application name in ASCII art - print(center_text(infinitei)) # "Created By Me" - else: - print(center_text(ascii_art)) # Minimal header - print(center_text(get_random_tip_with_color()) + "\n") - -def center_text(text): - terminal_width = os.get_terminal_size().columns - centered_lines = [] - for line in text.splitlines(): - centered_lines.append(line.center(terminal_width)) - return "\n".join(centered_lines)