From 690abbd79850da8fa983531a0fcf1e4d7ba2064f Mon Sep 17 00:00:00 2001 From: adithyagenie Date: Wed, 14 Dec 2022 12:28:50 +0530 Subject: [PATCH] Fixed some stuff earlier and forgot to commit --- maze/menu.py | 2 +- maze/modules/PlayerBase_func.py | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/maze/menu.py b/maze/menu.py index 4e9f2b7..e20d0d2 100644 --- a/maze/menu.py +++ b/maze/menu.py @@ -71,7 +71,7 @@ def menu(screen): while True: breakkey = screen.getch() if breakkey: - time.sleep(5) + time.sleep(2) sys.exit() elif key == ord("a"): database.screenhandler(screen) diff --git a/maze/modules/PlayerBase_func.py b/maze/modules/PlayerBase_func.py index 312cda6..f9edda7 100644 --- a/maze/modules/PlayerBase_func.py +++ b/maze/modules/PlayerBase_func.py @@ -510,6 +510,14 @@ def modify_account(screen): x // 2 - 10, optionaltxt="Enter new username: ", ) + if quitting: + screen.addstr("Going back to account settings...") + sleep(3) + quitting = False + screen.clear() + screen.refresh() + screenhandler(screen) + return post( f"UPDATE player_details\ SET username = '{newuser}'\ @@ -524,6 +532,14 @@ def modify_account(screen): newemail = email( screen, y // 2, x // 2 - 10, optionaltxt="Enter new email: " ) + if quitting: + screen.addstr("Going back to account settings...") + sleep(3) + quitting = False + screen.clear() + screen.refresh() + screenhandler(screen) + return post( f"UPDATE player_details\ SET email = '{newemail}'\ @@ -698,6 +714,7 @@ def forgotpassword(screen): """Forgot password screen + new password""" screen.clear() screen.refresh() + screen.border() y, x = screen.getmaxyx() screen.addstr( 1, x // 2 - 7, "FORGOT PASSWORD", curses.color_pair(3) | curses.A_BOLD @@ -742,7 +759,7 @@ def forgotpassword(screen): screen.addstr(y // 2 + 1, 5, "Enter OTP recieved in registered mail address:") while True: screen.refresh() - enter_otp = input(y // 2 + 1, 47, screen) + enter_otp = input(y // 2 + 1, 52, screen) if quitting: screen.addstr("Going back to account settings...") sleep(3)