Adds notice prompt to preferences screen

This commit is contained in:
2022-11-28 18:56:10 -03:00
parent fc2096d3f3
commit 57555453b8
3 changed files with 15 additions and 6 deletions

View File

@ -1,6 +1,6 @@
init offset = -1
screen OkPrompt(message, ok_action):
screen OkPrompt(message, go_menu):
modal True
@ -25,7 +25,7 @@ screen OkPrompt(message, ok_action):
xalign 0.5
spacing 100
textbutton _("OK") activate_sound "audio/ui/uiClick.wav" action Hide()
textbutton _("OK") activate_sound "audio/ui/uiClick.wav" action If(go_menu, true=MainMenu(False,False), false=Hide())
default persistent.seenWarning = []
@ -56,7 +56,7 @@ init:
transform glowie(img):
img
easeout_cubic 0.30 matrixcolor TintMatrix(Color((255, 255, 255)))
easein_cubic 0.30 matrixcolor TintMatrix(Color((255, 255, 255)))
transform darkie(img):
img
@ -105,7 +105,8 @@ screen lang_sel:
hover glowie(languages[i]["image"])
action If(languages[i]["value"] in persistent.seenWarning or languages[i]["value"] == None,
true = [Language(languages[i]["value"]), MainMenu(False,False)],
false = [Show(screen="OkPrompt", message=notice, ok_action=Hide()), AddToSet(set=persistent.seenWarning, value=languages[i]["value"])]
# Important to change the language before calling notice. Otherwise it will be in english.
false = [Language(languages[i]["value"]), AddToSet(set=persistent.seenWarning, value=languages[i]["value"]), Show(screen="OkPrompt", message=notice, go_menu=True)]
)
at renpysdumb # Scales the imagebutton down. No, you can't just specify the zoom here. It has to be a defined transform.
else: