Files
Whiskerbound/systems/ui.py

32 lines
605 B
Python

import os
import questionary
def clear():
os.system("cls" if os.name == "nt" else "clear")
def title():
clear()
print("=== Whiskerbound ===\n")
STYLE = questionary.Style(
[
("selected", "fg:cyan bold"),
("pointer", "fg:cyan bold"),
]
)
def select(message, choices):
return questionary.select(message, choices=choices, style=STYLE).ask()
def text(message, default=""):
return questionary.text(message, default=default, style=STYLE).ask()
def confirm(message, default=True):
return questionary.confirm(message, default=default, style=STYLE).ask()