I need to turn on the subtitles mode in the settings, but I don't have enough ideas how to adjust the screen
Youtube subtitle screen
Code: Select all
screen cap(who, what):
frame:
style "empty" # The empty style resets the frame to no background, margins, or padding.
background "#000" # Set the background to black.
padding (5, 5) # Add a bit of padding.
xalign 0.5 # Center the text.
yalign 1.0 yoffset -25
text what:
id "what" # Ren'Py needs this for a say screen to work.
pos (0, 0) # This screen needs the text to be positioned at (0, 0)
layout "subtitle" # Subtitle layout tries to make all lines even.
text_align 0.5 # Center the text within the text block.
size 25 # Set the text size.
Code: Select all
define au = Character(None, screen="cap")
Roughly speaking, I'm trying to do this
Code: Select all
default youtube_mode = False
if youtube_mode == True:
define au= Character(None, screen="cap")
else:
define au = Character('???', color="#f7f4f4", what_color="#f7f4f4", window_background="gui/bac.png")
Code: Select all
screen preferences():
add "images/pref.png"
add "images/pref2.png"
tag menu
fixed:
label _("{size=25}{color=#ffffff}Font"):
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
xalign 0.23 yalign 0.16
textbutton_("Default"):
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
xalign 0.46 yalign 0.17
action gui.SetPreference("font", "DejaVuSans.ttf")
textbutton _("DuduCyrillic"):
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
xalign 0.62 yalign 0.17
action gui.SetPreference("font", "font/duducyrillic.ttf")
textbutton _("Philosopher"):
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
xalign 0.75 yalign 0.17
action gui.SetPreference("font", "font/philosopher.ttf")
label _("{size=24}{color=#ffffff}Skip"):
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
xalign 0.23 yalign 0.24
textbutton _("Viewed text only"):
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
xalign 0.5 yalign 0.24
action Preference("skip", "seen")
textbutton _("All text"):
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
xalign 0.75 yalign 0.24
action Preference("skip", "all")
label _("{size=22}{color=#ffffff}AutoRead"):
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
xalign 0.23 yalign 0.32
textbutton _("Enable"):
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
xalign 0.5 yalign 0.32
action [Preference("auto-forward", "enable", Preference("auto-forward after click", "toggle"))]
textbutton _("Disable"):
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
xalign 0.75 yalign 0.32
action [Preference("auto-forward", "disable"), Preference("auto-forward after click", "toggle")]
label _("{size=22}{color=#ffffff}Youtub\nmode"):
xalign 0.23 yalign 0.4
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
textbutton _("Enable"):
text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ]
xalign 0.5 yalign 0.4
action SetField(persistent, "youtube_mode", True)
textbutton _("Disable"):
xalign 0.75 yalign 0.4 text_outlines [ (absolute(1), "#333333", absolute(1), absolute(1)) ] action SetField(persistent, "youtube_mode", False)
textbutton _("{size=25}{color=#ffffff}Return") xalign 0.05 yalign 0.9 action Return()