Resolves #209 | Simplifies the language selector and adds the notice prompt #210

Merged
MapAnon merged 8 commits from Legalo/SnootGame:LanSel into Patch8-RAGE 2022-11-29 00:04:42 +00:00
3 changed files with 15 additions and 6 deletions
Showing only changes of commit 57555453b8 - Show all commits

View File

@ -972,7 +972,7 @@ screen preferences():
textbutton _("Enable Lewd Images") action [Function(onclick_audio, persistent.lewd), ToggleVariable("persistent.lewd", True, False)] textbutton _("Enable Lewd Images") action [Function(onclick_audio, persistent.lewd), ToggleVariable("persistent.lewd", True, False)]
vbox: vbox:
style_prefix "navigation" style_prefix "check"
label _("Language") label _("Language")
vpgrid: vpgrid:
rows len(languages) rows len(languages)
@ -988,7 +988,12 @@ screen preferences():
xsize 400 xsize 400
ysize 60 ysize 60
hbox: 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 add lang["image"] at icon
vbox: vbox:

View File

@ -1,6 +1,6 @@
init offset = -1 init offset = -1
screen OkPrompt(message, ok_action): screen OkPrompt(message, go_menu):
modal True modal True
@ -25,7 +25,7 @@ screen OkPrompt(message, ok_action):
xalign 0.5 xalign 0.5
spacing 100 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 = [] default persistent.seenWarning = []
@ -56,7 +56,7 @@ init:
transform glowie(img): transform glowie(img):
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): transform darkie(img):
img img
@ -105,7 +105,8 @@ screen lang_sel:
hover glowie(languages[i]["image"]) hover glowie(languages[i]["image"])
action If(languages[i]["value"] in persistent.seenWarning or languages[i]["value"] == None, action If(languages[i]["value"] in persistent.seenWarning or languages[i]["value"] == None,
true = [Language(languages[i]["value"]), MainMenu(False,False)], 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. at renpysdumb # Scales the imagebutton down. No, you can't just specify the zoom here. It has to be a defined transform.
else: else:

View File

@ -6,3 +6,6 @@ translate es strings:
old "Self-voicing disabled." old "Self-voicing disabled."
new "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"