summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-05-09 20:55:24 -0300
committerJesusaves <cpntb1@ymail.com>2021-05-09 20:55:24 -0300
commit42e6319d00414665e24748925a2d20f54672ede3 (patch)
tree5e2c84624c35451f505acf20536b12ab098c25c4
parentc19a83ca9c6d4b42b9ca1d725b34ac4721213c3d (diff)
downloadrenpy-42e6319d00414665e24748925a2d20f54672ede3.tar.gz
renpy-42e6319d00414665e24748925a2d20f54672ede3.tar.bz2
renpy-42e6319d00414665e24748925a2d20f54672ede3.tar.xz
renpy-42e6319d00414665e24748925a2d20f54672ede3.zip
Add fancy screens for the Vault Authentication
-rw-r--r--game/update.rpy64
1 files changed, 56 insertions, 8 deletions
diff --git a/game/update.rpy b/game/update.rpy
index 97cabba..928246a 100644
--- a/game/update.rpy
+++ b/game/update.rpy
@@ -216,9 +216,9 @@ init python:
status_update("Steam session initialized successfully", 99)
time.sleep(0.1)
except:
- traceback.print_exc()
# NO FALLBACK: if Steam Login is on, do not try vault (no multiacc)
if persistent.steam:
+ traceback.print_exc()
status_update("{color=#f00}{b}STEAM AUTHENTICATION ERROR.\nIf the issue persists, try closing the app and opening again.{/b}{/color}")
responsive=False
return
@@ -240,16 +240,64 @@ init python:
#########################################
- status_update("Complete!", 100)
+ status_update(pc=100)
return
+#################################################################################
+screen register_method():
+ ## Ensure other screens do not get input while this screen is displayed.
+ modal True
+ zorder 200
+ style_prefix "confirm"
+ add "gui/overlay/confirm.png"
+ frame:
+ vbox:
+ xalign .5
+ yalign .5
+ spacing 30
+ label _("{b}Vault Authentication{/b}\n\nWhich method do you want to use to login on TMW Vault?\n{size=14}An account will be automatically created if it does not exists already. This implies accepting the Terms of Service.{/size}"):
+ style "confirm_prompt"
+ xalign 0.5
+
+ hbox:
+ xalign 0.5
+ spacing 100
+ textbutton _("Email Auth") action Return(1)
+ textbutton _("Pass+2FA Auth") action Return(2)
+
+screen register_input(prompt):
+ ## Ensure other screens do not get input while this screen is displayed.
+ modal True
+ zorder 200
+ style_prefix "confirm"
+ add "gui/overlay/confirm.png"
+ frame:
+ vbox:
+ xalign .5
+ yalign .5
+ spacing 30
+ label _(prompt):
+ style "confirm_prompt"
+ xalign 0.5
+
+ null height 24
+
+ input:
+ xalign 0.5
+ id "input"
+ copypaste True
+
label register:
- menu:
- "Select desired authetication method"
- "E-mail Auth":
- pass
- "2FA Authentication":
- pass
+ $ status_update(" ", 80)
+ call screen register_method
+ $ status_update(pc=85)
+ $ method = _return
+ call screen register_input("Are you sure [method]? Type \"YES\".")
+ $ status_update(pc=90)
+ $ answer = _return
+ $ stdout(answer)
+ $ del method
+ $ del answer
return