From 57555453b88cdc3a039be24dae4a75e7929a4fbd Mon Sep 17 00:00:00 2001 From: GManon Date: Mon, 28 Nov 2022 18:56:10 -0300 Subject: [PATCH] Adds notice prompt to preferences screen --- game/screens.rpy | 9 +++++++-- game/src/translation.rpy | 9 +++++---- game/tl/es/common.rpy | 3 +++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/game/screens.rpy b/game/screens.rpy index 57a3b16..8aaaad8 100644 --- a/game/screens.rpy +++ b/game/screens.rpy @@ -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: diff --git a/game/src/translation.rpy b/game/src/translation.rpy index 2861b5a..d196cad 100644 --- a/game/src/translation.rpy +++ b/game/src/translation.rpy @@ -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: diff --git a/game/tl/es/common.rpy b/game/tl/es/common.rpy index 010e108..512a0ac 100644 --- a/game/tl/es/common.rpy +++ b/game/tl/es/common.rpy @@ -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" +