Adds notice prompt to preferences screen

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

View File

@ -972,7 +972,7 @@ screen preferences():
textbutton _("Enable Lewd Images") action [Function(onclick_audio, persistent.lewd), ToggleVariable("persistent.lewd", True, False)]
vbox:
style_prefix "navigation"
style_prefix "check"
label _("Language")
vpgrid:
rows len(languages)
@ -988,7 +988,12 @@ screen preferences():
xsize 400
ysize 60
hbox:
textbutton lang["name"] action Language(lang["value"]) activate_sound "audio/ui/uiRollover.wav"
textbutton lang["name"]:
activate_sound "audio/ui/uiRollover.wav"
action If(lang["value"] in persistent.seenWarning or lang["value"] == None,
true = [Language(lang["value"])],
false = [Language(lang["value"]), AddToSet(set=persistent.seenWarning, value=lang["value"]), Show(screen="OkPrompt", message=notice, go_menu=False)]
)
add lang["image"] at icon
vbox:

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:

View File

@ -6,3 +6,6 @@ translate es strings:
old "Self-voicing disabled."
new "Self-voicing disabled."
old "NOTICE: Please keep in mind this is a fan translation, and as such it may not be completely accurate to the original intent of any written lines."
new "Testing"