InProgress: A Library based on the Curses Library that lives up to the name. Any thoughts?
It is still in progress. It has a LOT of potential to be honest. Here is how it is look like in perspective of you using my library:
from curses import wrapper
from src.divine import *
def main(scr):
class MainMenu(Heaven):
def __init__(self):
super().__init__()
self.maxy = 13
self.maxx = 30
self.summon()
option = ''
while True:
self.clear()
self.border()
self.write(f"Selected: {option}", 0, 2)
self.write("Mini Game", 2, 5, pullx=True, pully=True)
self.write("=========", pullx=True, leading=1)
self.write("1.Start Game", pully=True, pullx=True)
self.write("2.Save Game", pullx=True)
self.write("3.Load Game", pullx=True)
self.write("0.Quit Game", pullx=True, leading=1)
# Using pullx instead of adding y and x are better
# than adding everything because when it is time
# for you to change the root y and x for whatever
# reason, you will need to change all the other y
# and x after root
option = self.ask("Enter an option: ")
if option not in ('0', '1', '2', '3'):
option = ''
elif option == '0':
break
MainMenu()
wrapper(main)
I will create my own wrapper later, but this is just for pre-showcasing. You can deactivate the border, modify the border, you can create a ready made inputbox. Think it as a HTML and CSS but for terminal. Ofcourse it is not perfect yet! I need feedbacks! THANKS!