################################################################################ ## Initialization ################################################################################ init offset = -1 default persistent.named_saves = False ################################################################################ ## Styles ################################################################################ style default: outlines [ (absolute(2), "#000", absolute(0), absolute(0)) ] style default: properties gui.text_properties() language gui.language style input: properties gui.text_properties("input", accent=True) adjust_spacing False style hyperlink_text: properties gui.text_properties("hyperlink", accent=True) hover_underline True style gui_text: properties gui.text_properties("interface") style button: properties gui.button_properties("button") style button_text is gui_text: properties gui.text_properties("button") yalign 0.5 style label_text is gui_text: properties gui.text_properties("label", accent=True) style prompt_text is gui_text: properties gui.text_properties("prompt") style bar: ysize gui.bar_size left_bar Frame("gui/bar/left.png", gui.bar_borders, tile=gui.bar_tile) right_bar Frame("gui/bar/right.png", gui.bar_borders, tile=gui.bar_tile) style vbar: xsize gui.bar_size top_bar Frame("gui/bar/top.png", gui.vbar_borders, tile=gui.bar_tile) bottom_bar Frame("gui/bar/bottom.png", gui.vbar_borders, tile=gui.bar_tile) style scrollbar: ysize gui.scrollbar_size base_bar Frame("gui/scrollbar/horizontal_[prefix_]bar.png", gui.scrollbar_borders, tile=gui.scrollbar_tile) thumb Frame("gui/scrollbar/horizontal_[prefix_]thumb.png", gui.scrollbar_borders, tile=gui.scrollbar_tile) style vscrollbar: xsize gui.scrollbar_size base_bar Frame("gui/scrollbar/vertical_[prefix_]bar.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile) thumb Frame("gui/scrollbar/vertical_[prefix_]thumb.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile) style slider: ysize gui.slider_size base_bar Frame("gui/slider/horizontal_[prefix_]bar.png", gui.slider_borders, tile=gui.slider_tile) thumb "gui/slider/horizontal_[prefix_]thumb.png" style vslider: xsize gui.slider_size base_bar Frame("gui/slider/vertical_[prefix_]bar.png", gui.vslider_borders, tile=gui.slider_tile) thumb "gui/slider/vertical_[prefix_]thumb.png" style frame: padding gui.frame_borders.padding background Frame("gui/frame.png", gui.frame_borders, tile=gui.frame_tile) ################################################################################ ## In-game screens ################################################################################ ## Say screen ################################################################## ## ## The say screen is used to display dialogue to the player. It takes two ## parameters, who and what, which are the name of the speaking character and ## the text to be displayed, respectively. (The who parameter can be None if no ## name is given.) ## ## This screen must create a text displayable with id "what", as Ren'Py uses ## this to manage text display. It can also create displayables with id "who" ## and id "window" to apply style properties. ## ## https://www.renpy.org/doc/html/screen_special.html#say screen say(who, what): style_prefix "say" window: id "window" background Transform(style.window.background, alpha=persistent.dialogueBoxOpacity ) if who is not None: window: id "namebox" style "namebox" text who id "who" text what id "what" ## If there's a side image, display it above the text. Do not display on the ## phone variant - there's no room. if not renpy.variant("small"): add SideImage() xalign 0.0 yalign 1.0 ## Make the namebox available for styling through the Character object. init python: config.character_id_prefixes.append('namebox') style window is default style say_label is default style say_dialogue is default style say_thought is say_dialogue style namebox is default style namebox_label is say_label style window: xalign 0.5 xfill True yalign gui.textbox_yalign ysize gui.textbox_height background Image("gui/textbox.png", xalign=0.5, yalign=1.0) style namebox: xpos gui.name_xpos xanchor gui.name_xalign xsize gui.namebox_width ypos gui.name_ypos ysize gui.namebox_height background Frame("gui/namebox.png", gui.namebox_borders, tile=gui.namebox_tile, xalign=gui.name_xalign) padding gui.namebox_borders.padding style say_label: properties gui.text_properties("name", accent=True) xalign gui.name_xalign yalign 0.5 style say_dialogue: properties gui.text_properties("dialogue") xpos gui.dialogue_xpos xsize gui.dialogue_width ypos gui.dialogue_ypos ## Input screen ################################################################ ## ## This screen is used to display renpy.input. The prompt parameter is used to ## pass a text prompt in. ## ## This screen must create an input displayable with id "input" to accept the ## various input parameters. ## ## https://www.renpy.org/doc/html/screen_special.html#input screen input(prompt): style_prefix "input" window: vbox: xalign gui.dialogue_text_xalign xpos gui.dialogue_xpos xsize gui.dialogue_width ypos gui.dialogue_ypos text prompt style "input_prompt" input id "input" style input_prompt is default style input_prompt: xalign gui.dialogue_text_xalign properties gui.text_properties("input_prompt") style input: xalign gui.dialogue_text_xalign xmaximum gui.dialogue_width ## Choice screen ############################################################### ## ## This screen is used to display the in-game choices presented by the menu ## statement. The one parameter, items, is a list of objects, each with caption ## and action fields. ## ## https://www.renpy.org/doc/html/screen_special.html#choice screen choice(items): style_prefix "choice" vbox: for i in items: fixed xsize gui.choice_button_width ysize gui.choice_button_height yalign 0.5: textbutton i.caption action i.action yalign 0.5 ## When this is true, menu captions will be spoken by the narrator. When false, ## menu captions will be displayed as empty buttons. define config.narrator_menu = True style choice_vbox is vbox style choice_button is button style choice_button_text is button_text style choice_vbox: xalign 0.5 ypos 540 yanchor 0.5 spacing gui.choice_spacing style choice_button is default: properties gui.button_properties("choice_button") style choice_button_text is default: properties gui.button_text_properties("choice_button") yalign 0.5 ## Quick Menu screen ########################################################### ## ## The quick menu is displayed in-game to provide easy access to the out-of-game ## menus. screen quick_menu(): ## Ensure this appears on top of other screens. zorder 100 if quick_menu and renpy.variant("pc"): hbox: style_prefix "quick" xalign 0.5 yalign 1.0 textbutton _("{size=+3}{font=gui/fonts/text.ttf}Back{/font}{/size}") action Rollback() textbutton _("{size=+3}{font=gui/fonts/text.ttf}Skip{/font}{/size}") action Skip() alternate Skip(fast=True, confirm=True) textbutton _("{size=+3}{font=gui/fonts/text.ttf}Auto{/font}{/size}") action Preference("auto-forward", "toggle") textbutton _("{size=+3}{font=gui/fonts/text.ttf}Save{/font}{/size}") action ShowMenu('save') textbutton _("{size=+3}{font=gui/fonts/text.ttf}Q.Save{/font}{/size}") action QuickSave() textbutton _("{size=+3}{font=gui/fonts/text.ttf}Q.Load{/font}{/size}") action QuickLoad() textbutton _("{size=+3}{font=gui/fonts/text.ttf}Prefs{/font}{/size}") action ShowMenu('preferences') ## This code ensures that the quick_menu screen is displayed in-game, whenever ## the player has not explicitly hidden the interface. init python: config.overlay_screens.append("quick_menu") default quick_menu = True style quick_button is default style quick_button_text is button_text style quick_button: properties gui.button_properties("quick_button") style quick_button_text: properties gui.button_text_properties("quick_button") ################################################################################ ## Main and Game Menu Screens ################################################################################ ## Navigation screen ########################################################### ## ## This screen is included in the main and game menus, and provides navigation ## to other menus, and to start the game. screen navigation(): vbox: style_prefix "navigation" # Modified by 608 if renpy.get_screen("main_menu"): xalign 0.5 else: xpos gui.navigation_xpos yalign 0.5 spacing gui.navigation_spacing if main_menu: textbutton _("Start") action Start() else: textbutton _("Save") action ShowMenu("save") textbutton _("Load") action ShowMenu("load") textbutton _("Preferences") action ShowMenu("preferences") if _in_replay: textbutton _("End Replay") action EndReplay(confirm=True) elif not main_menu: textbutton _("Main Menu") action MainMenu() textbutton _("Gallery") action ShowMenu("gallery") textbutton _("About") action ShowMenu("about") if renpy.variant("pc") or (renpy.variant("web") and not renpy.variant("mobile")): ## Help isn't necessary or relevant to mobile devices. textbutton _("Help") action ShowMenu("help") if renpy.variant("pc"): ## The quit button is banned on iOS and unnecessary on Android and ## Web. textbutton _("Quit") action Quit(confirm=not main_menu) style navigation_button is gui_button style navigation_button_text is gui_button_text style navigation_button: size_group "navigation" properties gui.button_properties("navigation_button") style navigation_button_text: properties gui.button_text_properties("navigation_button") xalign 0.5 screen steambutton: imagebutton: # xanchor 0.80 # yanchor 0.25 # yanchor 0.80 # xpos 0.80 # ypos 0.25 # ypos 0.80 auto "gui/steam_%s.png" action OpenURL("https://store.steampowered.com/app/1975280?utm_source=chapter4") ## Main Menu screen ############################################################ ## ## Used to display the main menu when Ren'Py starts. ## ## https://www.renpy.org/doc/html/screen_special.html#main-menu transform patreonbutton: # Modified by 608 # xalign 0.85 xalign 0.55 # yalign 0.05 yalign 0.97 transform ssbutton: # Modified by 608 # xalign 0.98 xalign 0.45 # yalign 0.05 yalign 0.97 transform discordbutton: # Modified by 608 # xalign 0.91 xalign 0.37 # yalign 0.55 yalign 0.98 # Modified by 608 transform steambutton: xalign 0.91 # Modified by 608 # yalign 0.15 yalign 0.95 # Modified by 608 transform steambutton2: # xalign 0.91 xalign 0.63 # yalign 0.23 yalign 0.97 #transform uklang: # xalign 0.05 # yalign 0.10 transform usalang: xalign 0.02 yalign 0.05 transform frenchlang: xalign 0.05 yalign 0.05 transform spanishlang: xalign 0.08 yalign 0.05 transform italianlang: xalign 0.11 yalign 0.05 transform brazillang: xalign 0.14 yalign 0.05 transform chinalang: xalign 0.17 yalign 0.05 transform dlc: # Modified by 608 # xalign 0.06 xalign 0.95 # yalign 0.90 yalign 0.05 screen main_menu(): ## This ensures that any other menu screen is replaced. tag menu add gui.main_menu_background ## Remove this section for Steam release. if steam == 0: imagebutton auto "gui/patreon_%s.webp": action OpenURL("https://www.patreon.com/drooskati") at patreonbutton imagebutton auto "gui/ss_%s.webp": action OpenURL("https://subscribestar.adult/between-two-worlds") at ssbutton imagebutton auto "gui/steam_%s.png": action OpenURL("https://store.steampowered.com/app/1975280?utm_source=chapter4") at steambutton2 imagebutton auto "gui/discord_%s.png": action OpenURL("https://discord.gg/mxxEkWkQSP") at discordbutton # Modified by 608 # image "gui/logo.png": # xalign 0.95 # yalign 0.80 imagebutton auto "gui/dlc_%s.webp": action OpenURL("https://www.droosk.com/downloads/btw-DLC.zip") at dlc # imagebutton auto "gui/uk_%s.png": # action Language(None) # at uklang imagebutton: idle "usa_idle" hover im.MatrixColor("usa_hover.png", im.matrix.saturation(0.3) * im.matrix.tint(0.9, 0.9, 1.0)) selected_idle "usa_hover" action Language(None) at usalang imagebutton: idle "france_idle" hover im.MatrixColor("france_hover.png", im.matrix.saturation(0.3) * im.matrix.tint(0.9, 0.9, 1.0)) selected_idle "france_hover" action Language("french") at frenchlang imagebutton: idle "mexico_idle" hover im.MatrixColor("mexico_hover.png", im.matrix.saturation(0.3) * im.matrix.tint(0.9, 0.9, 1.0)) selected_idle "mexico_hover" action Language("spanish") at spanishlang imagebutton: idle "italy_idle" hover im.MatrixColor("italy_hover.png", im.matrix.saturation(0.3) * im.matrix.tint(0.9, 0.9, 1.0)) selected_idle "italy_hover" action Language("italian") at italianlang imagebutton: idle "brazil_idle" hover im.MatrixColor("brazil_hover.png", im.matrix.saturation(0.3) * im.matrix.tint(0.9, 0.9, 1.0)) selected_idle "brazil_hover" action Language("portuguese") at brazillang imagebutton: idle "china_idle" hover im.MatrixColor("china_hover.png", im.matrix.saturation(0.3) * im.matrix.tint(0.9, 0.9, 1.0)) selected_idle "china_hover" action Language("mandarin") at chinalang # imagebutton: # idle "usa_idle" # hover "usa_hover" # selected_idle "usa_hover" # action Language(None) # at usalang # # imagebutton: # idle "france_idle" # hover "france_hover" # selected_idle "france_hover" # action Language("french") # at frenchlang # # imagebutton: # idle "mexico_idle" # hover "mexico_hover" # selected_idle "mexico_hover" # action Language("spanish") # at spanishlang # # imagebutton: # idle "italy_idle" # hover "italy_hover" # selected_idle "italy_hover" # action Language("italian") # at italianlang ## This empty frame darkens the main menu. frame: style "main_menu_frame" ## The use statement includes another screen inside this one. The actual ## contents of the main menu are in the navigation screen. use navigation if gui.show_name: vbox: style "main_menu_vbox" text "[config.name!t]": style "main_menu_title" text "[config.version]": style "main_menu_version" style main_menu_frame is empty style main_menu_vbox is vbox style main_menu_text is gui_text style main_menu_title is main_menu_text style main_menu_version is main_menu_text #style main_menu_frame: # xsize 280 # yfill True # background "gui/overlay/main_menu.png" style main_menu_vbox: xalign 1.0 xoffset -20 xmaximum 800 yalign 1.0 yoffset -20 style main_menu_text: properties gui.text_properties("main_menu", accent=True) style main_menu_title: properties gui.text_properties("title") style main_menu_version: properties gui.text_properties("version") ## Game Menu screen ############################################################ ## ## This lays out the basic common structure of a game menu screen. It's called ## with the screen title, and displays the background, title, and navigation. ## ## The scroll parameter can be None, or one of "viewport" or "vpgrid". When ## this screen is intended to be used with one or more children, which are ## transcluded (placed) inside it. screen game_menu(title, scroll=None, yinitial=0.0): style_prefix "game_menu" if main_menu: add gui.main_menu_background else: add gui.game_menu_background frame: style "game_menu_outer_frame" hbox: ## Reserve space for the navigation section. frame: style "game_menu_navigation_frame" frame: style "game_menu_content_frame" if scroll == "viewport": viewport: yinitial yinitial scrollbars "vertical" mousewheel True draggable True pagekeys True side_yfill True vbox: transclude elif scroll == "vpgrid": vpgrid: cols 1 yinitial yinitial scrollbars "vertical" mousewheel True draggable True pagekeys True side_yfill True transclude else: transclude use navigation vbox: style_prefix "navigation" style "return_button" spacing gui.navigation_spacing # Gallery Back Button if renpy.get_screen("gallery_chapter"): textbutton _("Back"): action ShowMenu("gallery") textbutton _("Return"): #style "return_button" action Return() label title if main_menu: key "game_menu" action ShowMenu("main_menu") style game_menu_outer_frame is empty style game_menu_navigation_frame is empty style game_menu_content_frame is empty style game_menu_viewport is gui_viewport style game_menu_side is gui_side style game_menu_scrollbar is gui_vscrollbar style game_menu_label is gui_label style game_menu_label_text is gui_label_text style return_button is navigation_button style return_button_text is navigation_button_text style game_menu_outer_frame: bottom_padding 30 top_padding 120 xfill True background "gui/overlay/game_menuv2.png" style game_menu_navigation_frame: xsize 280 yfill True style game_menu_content_frame: left_margin 40 right_margin 20 top_margin 10 style game_menu_viewport: xfill True style game_menu_vscrollbar: unscrollable gui.unscrollable style game_menu_side: spacing 10 style game_menu_label: xpos 50 ysize 120 style game_menu_label_text: size gui.title_text_size color gui.accent_color yalign 0.5 style return_button: xpos gui.navigation_xpos yalign 1.0 yoffset -30 ## About screen ################################################################ ## ## This screen gives credit and copyright information about the game and Ren'Py. ## ## There's nothing special about this screen, and hence it also serves as an ## example of how to make a custom screen. screen about(): tag menu ## This use statement includes the game_menu screen inside this one. The ## vbox child is then included inside the viewport inside the game_menu ## screen. use game_menu(_("About"), scroll="viewport"): style_prefix "about" # Custom vbox: spacing 15 xsize 925 xpos 200 label "[config.name!t]" text _("{size=-18}{font=gui/fonts/text.ttf}Version [config.version!t]\n{/font}{/size}") ## gui.about is usually set in options.rpy. if gui.about: text "{size=-18}{font=gui/fonts/text.ttf}[gui.about!t]\n{/font}{/size}" text _("{size=-18}{font=gui/fonts/text.ttf}Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]{/font}{/size}") text _("{size=-18}{font=gui/fonts/text.ttf}Music where credits are required by license, both paid and CC+:{/font}{/size}") text _("{size=-18}{font=gui/fonts/text.ttf}Main Menu Music: Overture - Alora's Lament by Trane Francks - {a=https://www.608creations.com/}https://608creations.com/{/a}{/font}{/size}") text _("{size=-18}{font=gui/fonts/text.ttf}Music: Smile by Joakim Karud - https://www.joakimkarud.com{/font}{/size}") text _("{size=-18}{font=gui/fonts/text.ttf}Music: Dance by Lvly - https://www.epidemicsound.com{/font}{/size}") text _("{size=-18}{font=gui/fonts/text.ttf}Music: Good Pace by Thomas Gresen - https://www.soundcloud.com/thomasgresen (CC3){/font}{/size}") text _("{size=-18}{font=gui/fonts/text.ttf}Music: Various songs via Dark Fantasy Studio - https://www.darkfantasystudio.com{/font}{/size}") text _("{size=-18}{font=gui/fonts/text.ttf}Music: Various songs via Kevin MacLeod, CC0 - https://www.incompetech.com{/font}{/size}") text _("{size=-18}{font=gui/fonts/text.ttf}Video: Clip from original Night of the Living Dead - Public Domain{/font}{/size}") text _("{size=-18}{font=gui/fonts/text.ttf}Image: Still from Flash Gordon Conquers the Universe - Public Domain{/font}{/size}") style about_label is gui_label style about_label_text is gui_label_text style about_text is gui_text style about_label_text: size gui.label_text_size ## Load and Save screens ####################################################### ## ## These screens are responsible for letting the player save the game and load ## it again. Since they share nearly everything in common, both are implemented ## in terms of a third screen, file_slots. ## ## https://www.renpy.org/doc/html/screen_special.html#save https:// ## www.renpy.org/doc/html/screen_special.html#load screen save(): tag menu use file_slots(_("Save")) screen load(): tag menu use file_slots(_("Load")) screen file_slots(title): default page_name_value = FilePageNameInputValue(pattern=_("Page {}"), auto=_("Automatic saves"), quick=_("Quick saves")) use game_menu(title): fixed: ## This ensures the input will get the enter event before any of the ## buttons do. order_reverse True ## The page name, which can be edited by clicking on a button. button: style "page_label" key_events True xalign 0.5 action page_name_value.Toggle() input: style "page_label_text" value page_name_value ## The grid of file slots. grid gui.file_slot_cols gui.file_slot_rows: style_prefix "slot" xalign 0.5 yalign 0.5 spacing gui.slot_spacing for i in range(gui.file_slot_cols * gui.file_slot_rows): $ slot = i + 1 python: save_name_text = FileSaveName(slot, empty=_("empty slot")) save_name_text = "{size=+4}{font=gui/fonts/text.ttf}"+save_name_text+"{/font}{/size}" if save_name_text != "" else "" save_time_text = FileTime(slot,format=_("{size=+4}{font=gui/fonts/text.ttf}{#file_time}%B %d %Y, %H:%M{/font}{/size}")) tsx = int((gallery_frame_w-gallery_thumb_w)/2) tsy = int((gallery_frame_h-gallery_thumb_h)/2) save_thumb = FileScreenshot(slot, empty="gui/gallery/coming_soon.webp") imagebutton: if title == "Save": if persistent.named_saves: # SetVariable is used so that when setting a save name, the default is any existing name in that slot # Removing it will have the last name input carry over as the default to all slots action [SetVariable("save_name", FileSaveName(slot)), Show("save_name_query", slot=slot)] else: # Wipe save_name, otherwise the last input name will be copied to all future saves action [SetVariable("save_name", ""), FileAction(slot)] else: action FileAction(slot) idle VBox(Composite((gallery_frame_w,gallery_frame_h),(tsx,tsy),At(save_thumb,slot_thumb),(0,0),"gui/gallery/frame.webp"),Text(save_name_text,style="slot_name_text",color=gui.idle_small_color,substitute=False) if save_name_text != "" else Null(height=8),Text(save_time_text,style="slot_time_text",color=gui.idle_small_color),spacing=-8) hover VBox(Composite((gallery_frame_w,gallery_frame_h),(tsx,tsy),At(save_thumb,slot_thumb,slot_hover),(0,0),"gui/gallery/frame.webp"),Text(save_name_text,style="slot_name_text",color=gui.hover_color,substitute=False) if save_name_text != "" else Null(height=8),Text(save_time_text,style="slot_time_text",color=gui.hover_color),spacing=-8) insensitive VBox(Composite((gallery_frame_w,gallery_frame_h),(tsx,tsy),At(save_thumb,slot_thumb),(0,0),"gui/gallery/frame.webp"),Text(save_name_text,style="slot_name_text",color=gui.insensitive_color,substitute=False) if save_name_text != "" else Null(height=8),Text(save_time_text,style="slot_time_text",color=gui.insensitive_color),spacing=-8) # Key mapping doesn't work with imagebutton, so bind delete to the alternate (right-click or click-and-hold) alternate FileDelete(slot) ## Buttons to access other pages. hbox: style_prefix "page" xalign 0.5 yalign 1.0 spacing gui.page_spacing imagebutton: yalign 0.5 idle "gui/gallery/nav_left.webp" hover At("gui/gallery/nav_left.webp", gallery_nav_hover) action FilePagePrevious() if config.has_autosave: textbutton _("{#auto_page}A") action FilePage("auto") if config.has_quicksave: textbutton _("{#quick_page}Q") action FilePage("quick") ## range(1, 10) gives the numbers from 1 to 9. for page in range(1, 10): textbutton "[page]" action FilePage(page) imagebutton: yalign 0.5 idle "gui/gallery/nav_right.webp" hover At("gui/gallery/nav_right.webp", gallery_nav_hover) action FilePageNext() screen save_name_query(slot): modal True add Solid("#000000") alpha 0.8 frame: xpadding 20 ypadding 20 xalign 0.5 yalign 0.5 has vbox: xalign 0.5 spacing 10 null width 400 # Makes the frame nice and wide label _("Save name"): text_color gui.text_color xalign 0.5 input value VariableInputValue("save_name"): #default FileSaveName(slot) # doesn't work. using SetVariable above pixel_width 384 # Sets a maximum length on the name color gui.hover_color yalign 1.0 xalign 0.5 xysize (550, 40) textbutton _("Save game"): xalign 0.5 keysym ["K_RETURN", "K_KP_ENTER"] # Bind enter to save action [FileSave(slot), Hide("save_name_query")] key "game_menu" action Hide("save_name_query") # Escape to abort transform slot_thumb: xalign 0.5 yalign 0.5 xsize config.thumbnail_width ysize config.thumbnail_height transform slot_hover: matrixcolor BrightnessMatrix(0.1) style page_label is gui_label style page_label_text is gui_label_text style page_button is gui_button style page_button_text is gui_button_text style slot_button is gui_button style slot_button_text is gui_button_text style slot_time_text is slot_button_text style slot_name_text is slot_button_text style page_label: xpadding 50 ypadding 3 style page_label_text: text_align 0.5 layout "subtitle" hover_color gui.hover_color style page_button: properties gui.button_properties("page_button") style page_button_text: properties gui.button_text_properties("page_button") style slot_button: properties gui.button_properties("slot_button") style slot_button_text: properties gui.button_text_properties("slot_button") ## Preferences screen ########################################################## ## ## The preferences screen allows the player to configure the game to better suit ## themselves. ## ## https://www.renpy.org/doc/html/screen_special.html#preferences screen preferences(): tag menu # Custom use game_menu(_("Preferences"), scroll="viewport"): vbox: spacing 5 xsize 925 ysize 900 xpos 90 ypos 40 hbox: spacing 5 box_wrap True if renpy.variant("pc") or renpy.variant("web"): vbox: style_prefix "check" label _("{size=+20}Display{/size}") textbutton _("{size=-15}{font=gui/fonts/text.ttf}Window{/font}{/size}") action Preference("display", "window") textbutton _("{size=-15}{font=gui/fonts/text.ttf}Fullscreen{/font}{/size}") action Preference("display", "fullscreen") null height 20 label _("{size=+20}Named Saves{/size}") textbutton _("{size=-15}{font=gui/fonts/text.ttf}Enabled{/font}{/size}") action SetVariable("persistent.named_saves", True) textbutton _("{size=-15}{font=gui/fonts/text.ttf}Disabled{/font}{/size}") action SetVariable("persistent.named_saves", False) vbox: style_prefix "check" label _("{size=+20}Rollback Side{/size}") textbutton _("{size=-15}{font=gui/fonts/text.ttf}Disable{/font}{/size}") action Preference("rollback side", "disable") textbutton _("{size=-15}{font=gui/fonts/text.ttf}Left{/font}{/size}") action Preference("rollback side", "left") textbutton _("{size=-15}{font=gui/fonts/text.ttf}Right{/font}{/size}") action Preference("rollback side", "right") vbox: style_prefix "check" label _("{size=+20}Skip{/size}") textbutton _("{size=-15}{font=gui/fonts/text.ttf}Unseen Text{/font}{/size}") action Preference("skip", "toggle") textbutton _("{size=-15}{font=gui/fonts/text.ttf}After Choices{/font}{/size}") action Preference("after choices", "toggle") textbutton _("{size=-15}{font=gui/fonts/text.ttf}Transitions{/font}{/size}") action InvertSelected(Preference("transitions", "toggle")) vbox: style_prefix "check" label _("{size=+20}Language{/size}") textbutton _("{size=-15}{font=gui/fonts/text.ttf}English{/font}{/size}") action Language(None) textbutton _("{size=-15}{font=gui/fonts/text.ttf}Français{/font}{/size}") action Language("french") textbutton _("{size=-15}{font=gui/fonts/text.ttf}Español{/font}{/size}") action Language("spanish") textbutton _("{size=-15}{font=gui/fonts/text.ttf}Italiano{/font}{/size}") action Language("italian") textbutton _("{size=-15}{font=gui/fonts/text.ttf}Português{/font}{/size}") action Language("portuguese") textbutton _("{size=-15}{font=gui/fonts/SourceHanSans.otf}简体中文{/font}{/size}") action Language("mandarin") ## Additional vboxes of type "radio_pref" or "check_pref" can be ## added here, to add additional creator-defined preferences. elif renpy.variant("steam_deck"): vbox: style_prefix "radio" label _("{size=+20}Display{/size}") textbutton _("{size=+5}{font=gui/fonts/text.ttf}Window{/font}{/size}") action Preference("display", "window") textbutton _("{size=+5}{font=gui/fonts/text.ttf}Fullscreen{/font}{/size}") action Preference("display", "fullscreen") vbox: style_prefix "radio" label _("{size=+20}Rollback Side{/size}") textbutton _("{size=+5}{font=gui/fonts/text.ttf}Disable{/font}{/size}") action Preference("rollback side", "disable") textbutton _("{size=+5}{font=gui/fonts/text.ttf}Left{/font}{/size}") action Preference("rollback side", "left") textbutton _("{size=+5}{font=gui/fonts/text.ttf}Right{/font}{/size}") action Preference("rollback side", "right") vbox: style_prefix "check" label _("{size=+20}Skip{/size}") textbutton _("{size=+5}{font=gui/fonts/text.ttf}Unseen Text{/font}{/size}") action Preference("skip", "toggle") textbutton _("{size=+5}{font=gui/fonts/text.ttf}After Choices{/font}{/size}") action Preference("after choices", "toggle") textbutton _("{size=+5}{font=gui/fonts/text.ttf}Transitions{/font}{/size}") action InvertSelected(Preference("transitions", "toggle")) vbox: style_prefix "check" label _("{size=+20}Language{/size}") textbutton _("{size=+5}{font=gui/fonts/text.ttf}English{/font}{/size}") action Language(None) textbutton _("{size=+5}{font=gui/fonts/text.ttf}Français{/font}{/size}") action Language("french") textbutton _("{size=+5}{font=gui/fonts/text.ttf}Español{/font}{/size}") action Language("spanish") textbutton _("{size=+5}{font=gui/fonts/text.ttf}Italiano{/font}{/size}") action Language("italian") textbutton _("{size=-15}{font=gui/fonts/SourceHanSans.otf}简体中文{/font}{/size}") action Language("mandarin") ## Additional vboxes of type "radio_pref" or "check_pref" can be ## added here, to add additional creator-defined preferences. vbox: style_prefix "check" label _("{size=+20}Named Saves{/size}") textbutton _("{size=+5}{font=gui/fonts/text.ttf}Enabled{/font}{/size}") action SetVariable("persistent.named_saves", True) textbutton _("{size=+5}{font=gui/fonts/text.ttf}Disabled{/font}{/size}") action SetVariable("persistent.named_saves", False) # null height (4 * gui.pref_spacing) hbox: style_prefix "slider" box_wrap True vbox: label _("{size=+6}{font=gui/fonts/text.ttf}Text Speed{/font}{/size}") bar value Preference("text speed") label _("{size=+6}{font=gui/fonts/text.ttf}Dialogue Box Opacity{/font}{/size}") bar value FieldValue(persistent, "dialogueBoxOpacity", range=1.0, style="slider") label _("{size=+6}{font=gui/fonts/text.ttf}Auto-Forward Time{/font}{/size}") bar value Preference("auto-forward time") vbox: if config.has_music: label _("{size=+6}{font=gui/fonts/text.ttf}Music Volume{/font}{/size}") hbox: bar value Preference("music volume") if config.has_sound: label _("{size=+6}{font=gui/fonts/text.ttf}Sound Volume{/font}{/size}") hbox: bar value Preference("sound volume") if config.sample_sound: textbutton _("Test") action Play("sound", config.sample_sound) if config.has_voice: label _("{size=+4}{font=gui/fonts/text.ttf}Voice Volume{/font}{/size}") hbox: bar value Preference("voice volume") if config.sample_voice: textbutton _("Test") action Play("voice", config.sample_voice) if config.has_music or config.has_sound or config.has_voice: null height gui.pref_spacing textbutton _("{size=+10}{font=gui/fonts/text.ttf}Mute All{/font}{/size}"): action Preference("all mute", "toggle") style "mute_all_button" style pref_label is gui_label style pref_label_text is gui_label_text style pref_vbox is vbox style radio_label is pref_label style radio_label_text is pref_label_text style radio_button is gui_button style radio_button_text is gui_button_text style radio_vbox is pref_vbox style check_label is pref_label style check_label_text is pref_label_text style check_button is gui_button style check_button_text is gui_button_text style check_vbox is pref_vbox style slider_label is pref_label style slider_label_text is pref_label_text style slider_slider is gui_slider style slider_button is gui_button style slider_button_text is gui_button_text style slider_pref_vbox is pref_vbox style mute_all_button is check_button style mute_all_button_text is check_button_text style pref_label: top_margin gui.pref_spacing bottom_margin 2 style pref_label_text: yalign 1.0 style pref_vbox: xsize 225 xpos 200 style radio_vbox: spacing gui.pref_button_spacing style radio_button: properties gui.button_properties("radio_button") foreground "gui/button/radio_[prefix_]foreground.png" style radio_button_text: properties gui.button_text_properties("radio_button") style check_vbox: spacing gui.pref_button_spacing xpos 200 style check_button: properties gui.button_properties("check_button") foreground "gui/button/check_[prefix_]foreground.png" style check_button_text: properties gui.button_text_properties("check_button") style slider_slider: xsize 350 style slider_button: properties gui.button_properties("slider_button") yalign 0.5 left_margin 10 style slider_button_text: properties gui.button_text_properties("slider_button") style slider_vbox: xsize 450 xpos 200 ## Help screen ################################################################# ## ## A screen that gives information about key and mouse bindings. It uses other ## screens (keyboard_help, mouse_help, and gamepad_help) to display the actual ## help. screen help(): tag menu default device = "keyboard" # Custom use game_menu(_("Help"), scroll="viewport"): style_prefix "help" vbox: spacing 15 xsize 925 xpos 200 hbox: spacing 100 xpos 140 textbutton _("Keyboard") action SetScreenVariable("device", "keyboard") textbutton _("Mouse") action SetScreenVariable("device", "mouse") if GamepadExists(): textbutton _("Gamepad") action SetScreenVariable("device", "gamepad") if device == "keyboard": use keyboard_help elif device == "mouse": use mouse_help elif device == "gamepad": use gamepad_help screen keyboard_help(): hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Enter{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Advances dialogue and activates the interface.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Space{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Advances dialogue without selecting choices.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Arrow Keys{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Navigate the interface.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Escape{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Accesses the game menu.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Ctrl{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Skips dialogue while held down.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Tab{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Toggles dialogue skipping.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Page Up{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Rolls back to earlier dialogue.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Page Down{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Rolls forward to later dialogue.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}H{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Hides the user interface.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}S{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Takes a screenshot.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}V{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Toggles assistive {a=https://www.renpy.org/l/voicing}self-voicing{/a}.{/font}{/size}") screen mouse_help(): hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Left Click{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Advances dialogue and activates the interface.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Middle Click{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Hides the user interface.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Right Click{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Accesses the game menu.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Mouse Wheel Up\nClick Rollback Side{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Rolls back to earlier dialogue.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Mouse Wheel Down{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Rolls forward to later dialogue.{/font}{/size}") screen gamepad_help(): hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Right Trigger\nA/Bottom Button{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Advances dialogue and activates the interface.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Left Trigger\nLeft Shoulder{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Rolls back to earlier dialogue.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Right Shoulder{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Rolls forward to later dialogue.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}D-Pad, Sticks{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Navigate the interface.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Start, Guide{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Accesses the game menu.{/font}{/size}") hbox: spacing 30 label _("{size=-1}{font=gui/fonts/text.ttf}Y/Top Button{/font}{/size}") text _("{size=-17}{font=gui/fonts/text.ttf}Hides the user interface.{/font}{/size}") textbutton _("Calibrate") action GamepadCalibrate() style help_button is gui_button style help_button_text is gui_button_text style help_label is gui_label style help_label_text is gui_label_text style help_text is gui_text style help_button: properties gui.button_properties("help_button") xmargin 8 style help_button_text: properties gui.button_text_properties("help_button") style help_label: xsize 250 right_padding 20 style help_label_text: size gui.text_size xalign 1.0 text_align 1.0 ################################################################################ ## Additional screens ################################################################################ ## Confirm screen ############################################################## ## ## The confirm screen is called when Ren'Py wants to ask the player a yes or no ## question. ## ## https://www.renpy.org/doc/html/screen_special.html#confirm screen confirm(message, yes_action, no_action): ## Ensure other screens do not get input while this screen is displayed. modal True zorder 200 style_prefix "confirm" add "gui/overlay/confirm.png" frame: vbox: xalign .5 yalign .5 spacing 30 label _(message): style "confirm_prompt" xalign 0.5 hbox: xalign 0.5 spacing 100 textbutton _("Yes") action yes_action textbutton _("No") action no_action ## Right-click and escape answer "no". key "game_menu" action no_action style confirm_frame is gui_frame style confirm_prompt is gui_prompt style confirm_prompt_text is gui_prompt_text style confirm_button is gui_medium_button style confirm_button_text is gui_medium_button_text style confirm_frame: background Frame([ "gui/confirm_frame.png", "gui/frame.png"], gui.confirm_frame_borders, tile=gui.frame_tile) padding gui.confirm_frame_borders.padding xalign .5 yalign .5 style confirm_prompt_text: text_align 0.5 layout "subtitle" style confirm_button: properties gui.button_properties("confirm_button") style confirm_button_text: properties gui.button_text_properties("confirm_button") ## Skip indicator screen ####################################################### ## ## The skip_indicator screen is displayed to indicate that skipping is in ## progress. ## ## https://www.renpy.org/doc/html/screen_special.html#skip-indicator screen skip_indicator(): zorder 100 style_prefix "skip" frame: hbox: spacing 6 text _("Skipping") text "▸" at delayed_blink(0.0, 1.0) style "skip_triangle" text "▸" at delayed_blink(0.2, 1.0) style "skip_triangle" text "▸" at delayed_blink(0.4, 1.0) style "skip_triangle" ## This transform is used to blink the arrows one after another. transform delayed_blink(delay, cycle): alpha .5 pause delay block: linear .2 alpha 1.0 pause .2 linear .2 alpha 0.5 pause (cycle - .4) repeat style skip_frame is empty style skip_text is gui_text style skip_triangle is skip_text style skip_frame: ypos gui.skip_ypos background Frame("gui/skip.png", gui.skip_frame_borders, tile=gui.frame_tile) padding gui.skip_frame_borders.padding style skip_text: size gui.notify_text_size style skip_triangle: ## We have to use a font that has the BLACK RIGHT-POINTING SMALL TRIANGLE ## glyph in it. font "DejaVuSans.ttf" ## Notify screen ############################################################### ## ## The notify screen is used to show the player a message. (For example, when ## the game is quicksaved or a screenshot has been taken.) ## ## https://www.renpy.org/doc/html/screen_special.html#notify-screen screen notify(message): zorder 100 style_prefix "notify" frame at notify_appear: text "[message!tq]" timer 3.25 action Hide('notify') transform notify_appear: on show: alpha 0 linear .25 alpha 1.0 on hide: linear .5 alpha 0.0 style notify_frame is empty style notify_text is gui_text style notify_frame: ypos gui.notify_ypos background Frame("gui/notify.png", gui.notify_frame_borders, tile=gui.frame_tile) padding gui.notify_frame_borders.padding style notify_text: properties gui.text_properties("notify") ## NVL screen ################################################################## ## ## This screen is used for NVL-mode dialogue and menus. ## ## https://www.renpy.org/doc/html/screen_special.html#nvl screen nvl(dialogue, items=None): window: style "nvl_window" has vbox: spacing gui.nvl_spacing ## Displays dialogue in either a vpgrid or the vbox. if gui.nvl_height: vpgrid: cols 1 yinitial 1.0 use nvl_dialogue(dialogue) else: use nvl_dialogue(dialogue) ## Displays the menu, if given. The menu may be displayed incorrectly if ## config.narrator_menu is set to True, as it is above. for i in items: textbutton i.caption: action i.action style "nvl_button" add SideImage() xalign 0.0 yalign 1.0 screen nvl_dialogue(dialogue): for d in dialogue: window: id d.window_id fixed: yfit gui.nvl_height is None if d.who is not None: text d.who: id d.who_id text d.what: id d.what_id ## This controls the maximum number of NVL-mode entries that can be displayed at ## once. define config.nvl_list_length = gui.nvl_list_length style nvl_window is default style nvl_entry is default style nvl_label is say_label style nvl_dialogue is say_dialogue style nvl_button is button style nvl_button_text is button_text style nvl_window: xfill True yfill True background "gui/nvl.png" padding gui.nvl_borders.padding style nvl_entry: xfill True ysize gui.nvl_height style nvl_label: xpos gui.nvl_name_xpos xanchor gui.nvl_name_xalign ypos gui.nvl_name_ypos yanchor 0.0 xsize gui.nvl_name_width min_width gui.nvl_name_width text_align gui.nvl_name_xalign style nvl_dialogue: xpos gui.nvl_text_xpos xanchor gui.nvl_text_xalign ypos gui.nvl_text_ypos xsize gui.nvl_text_width min_width gui.nvl_text_width text_align gui.nvl_text_xalign layout ("subtitle" if gui.nvl_text_xalign else "tex") style nvl_thought: xpos gui.nvl_thought_xpos xanchor gui.nvl_thought_xalign ypos gui.nvl_thought_ypos xsize gui.nvl_thought_width min_width gui.nvl_thought_width text_align gui.nvl_thought_xalign layout ("subtitle" if gui.nvl_text_xalign else "tex") style nvl_button: properties gui.button_properties("nvl_button") xpos gui.nvl_button_xpos xanchor gui.nvl_button_xalign style nvl_button_text: properties gui.button_text_properties("nvl_button") ################################################################################ ## Mobile Variants ################################################################################ style pref_vbox: variant "medium" xsize 950 ## Since a mouse may not be present, we replace the quick menu with a version ## that uses fewer and bigger buttons that are easier to touch. screen quick_menu(): variant "steam_deck" # zorder 100 # if quick_menu and renpy.variant("pc"): # hbox: # style_prefix "quick" # xalign 0.5 # yalign 1.0 # textbutton _("Back") action Rollback() # textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True) # textbutton _("Auto") action Preference("auto-forward", "toggle") # textbutton _("Menu") action ShowMenu() # textbutton _("Hide") action HideInterface() style window: variant "small" background "gui/phone/textbox.png" style radio_button: variant "small" foreground "gui/phone/button/radio_[prefix_]foreground.png" style check_button: variant "small" foreground "gui/phone/button/check_[prefix_]foreground.png" style nvl_window: variant "small" background "gui/phone/nvl.png" #style main_menu_frame: # variant "small" # background "gui/phone/overlay/main_menu.png" style game_menu_outer_frame: variant "small" background "gui/phone/overlay/game_menu.png" style game_menu_navigation_frame: variant "small" xsize 340 style game_menu_content_frame: variant "small" top_margin 0 style pref_vbox: variant "small" xsize 400 style bar: variant "small" ysize gui.bar_size left_bar Frame("gui/phone/bar/left.png", gui.bar_borders, tile=gui.bar_tile) right_bar Frame("gui/phone/bar/right.png", gui.bar_borders, tile=gui.bar_tile) style vbar: variant "small" xsize gui.bar_size top_bar Frame("gui/phone/bar/top.png", gui.vbar_borders, tile=gui.bar_tile) bottom_bar Frame("gui/phone/bar/bottom.png", gui.vbar_borders, tile=gui.bar_tile) style scrollbar: variant "small" ysize gui.scrollbar_size base_bar Frame("gui/phone/scrollbar/horizontal_[prefix_]bar.png", gui.scrollbar_borders, tile=gui.scrollbar_tile) thumb Frame("gui/phone/scrollbar/horizontal_[prefix_]thumb.png", gui.scrollbar_borders, tile=gui.scrollbar_tile) style vscrollbar: variant "small" xsize gui.scrollbar_size base_bar Frame("gui/phone/scrollbar/vertical_[prefix_]bar.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile) thumb Frame("gui/phone/scrollbar/vertical_[prefix_]thumb.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile) style slider: variant "small" ysize gui.slider_size base_bar Frame("gui/phone/slider/horizontal_[prefix_]bar.png", gui.slider_borders, tile=gui.slider_tile) thumb "gui/phone/slider/horizontal_[prefix_]thumb.png" style vslider: variant "small" xsize gui.slider_size base_bar Frame("gui/phone/slider/vertical_[prefix_]bar.png", gui.vslider_borders, tile=gui.slider_tile) thumb "gui/phone/slider/vertical_[prefix_]thumb.png" style slider_vbox: variant "small" xsize None style slider_slider: variant "small" xsize 600