From 844f4010519d77dfd3206817edd0d557b5e58bcf Mon Sep 17 00:00:00 2001 From: Map Date: Sun, 8 Jun 2025 08:18:17 -0500 Subject: [PATCH] Adjust history screen to fit more text, adjust options menu to be more akin to Wani on Android, fix edge scroll option erroneously showing on Android and not pc --- game/gui.rpy | 16 ++-- game/screens.rpy | 186 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 165 insertions(+), 37 deletions(-) diff --git a/game/gui.rpy b/game/gui.rpy index 3e3501e..94a9e4e 100644 --- a/game/gui.rpy +++ b/game/gui.rpy @@ -360,9 +360,9 @@ define config.history_length = 250 ## The height of a history screen entry, or None to make the height variable at ## the cost of performance. -define gui.history_height = 210 +define gui.history_height = None -define gui.history_spacing = 0 +define gui.history_spacing = 50 ## The position, width, and alignment of the label giving the name of the ## speaking character. @@ -372,9 +372,9 @@ define gui.history_name_width = 233 define gui.history_name_xalign = 1.0 ## The position, width, and alignment of the dialogue text. -define gui.history_text_xpos = 255 +define gui.history_text_xpos = 248 define gui.history_text_ypos = 3 -define gui.history_text_width = 1110 +define gui.history_text_width = 1112 define gui.history_text_xalign = 0.0 @@ -451,9 +451,9 @@ init python: gui.text_size = 44 gui.name_text_size = 46 gui.notify_text_size = 38 - gui.interface_text_size = 45 + gui.interface_text_size = 40 gui.button_text_size = 45 - gui.label_text_size = 51 + gui.label_text_size = 45 ## Namebox gui.name_xpos = 395 @@ -473,8 +473,8 @@ init python: gui.navigation_spacing = 30 gui.pref_button_spacing = 15 - gui.history_height = 285 - gui.history_text_width = 1035 + gui.history_spacing = 75 + gui.history_text_width = 1012 gui.quick_button_text_size = 30 diff --git a/game/screens.rpy b/game/screens.rpy index 124ff21..31344d9 100644 --- a/game/screens.rpy +++ b/game/screens.rpy @@ -866,26 +866,17 @@ screen preferences(): hbox: box_wrap True - if renpy.variant("pc") or renpy.variant("web"): + vbox: + style_prefix "radio" + label _("Display") + textbutton _("Window") activate_sound "audio/ui/uiOptionOn.wav" action Preference("display", "any window") + textbutton _("Fullscreen") activate_sound "audio/ui/uiOptionOn.wav" action Preference("display", "fullscreen") - vbox: - style_prefix "radio" - label _("Display") - textbutton _("Window") activate_sound "audio/ui/uiOptionOn.wav" action Preference("display", "any window") - textbutton _("Fullscreen") activate_sound "audio/ui/uiOptionOn.wav" action Preference("display", "fullscreen") + vbox: + style_prefix "check" + label _("Requires Restart") + textbutton _("Enable Forward-Scroll Movement") action [Function(onclick_audio, persistent.scroll), ToggleVariable("persistent.scroll", True, False)] - vbox: - style_prefix "check" - label _("Requires Restart") - textbutton _("Enable Forward-Scroll Movement") action [Function(onclick_audio, persistent.scroll), ToggleVariable("persistent.scroll", True, False)] - - if renpy.variant(["mobile", "steam_deck"]): - vbox: - style_prefix "radio" - label _("Rollback Side") - textbutton _("Disable") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "disable") - textbutton _("Left") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "left") - textbutton _("Right") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "right") vbox: style_prefix "check" label _("Naughty Stuff") @@ -917,11 +908,10 @@ screen preferences(): textbutton _("Show Mod Screenshots") action [Function(onclick_audio, persistent.show_mod_screenshots), ToggleVariable("persistent.show_mod_screenshots", True, False)] textbutton _("Enable New Mods") action [Function(onclick_audio, persistent.newmods_default_state), ToggleVariable("persistent.newmods_default_state", True, False)] - if renpy.variant(["mobile", "steam_deck"]): - vbox: - style_prefix "check" - label _("Gallery") - textbutton _("Enable Edgescrolling") action [Function(onclick_audio, persistent.gallery_edgescroll), ToggleVariable("persistent.gallery_edgescroll", True, False)] + vbox: + style_prefix "check" + label _("Gallery") + textbutton _("Enable Edgescrolling") action [Function(onclick_audio, persistent.gallery_edgescroll), ToggleVariable("persistent.gallery_edgescroll", True, False)] if renpy.seen_image("big ending"): vbox: @@ -1195,16 +1185,19 @@ screen extrasnavigation(): add "gui/sneedgame.png" else: add "gui/snootgame.png" + + $ multi = persistent.enable_chapter_select + renpy.variant("pc") vbox: spacing 10 xpos 1885 - ypos (1269 if persistent.enable_chapter_select else 1130) + + ypos 991 + (139 * multi) $ main_menu_button_img = "gui/button/menubuttons/template_idle_epilogue.png" if persistent.use_epilogue_menu else "gui/button/menubuttons/template_idle.png" use main_menu_buttons(main_menu_button_img, [ - [ _("Help"), ShowMenu("help") ], + *([(_("Help"), ShowMenu("help"))] if not renpy.variant("mobile") else []), [ _("About"), ShowMenu("about") ], [ _("Gallery"), ShowMenu("cg_gallery") ], *([(_("Chapter Select{#MainMenu}"), Start("chapter_select"))] if persistent.enable_chapter_select else []), @@ -1366,7 +1359,7 @@ screen gamepad_help(): label _("Y/Top Button") text _("Hides the user interface.") - textbutton _("Calibrate") action GamepadCalibrate() + textbutton _("Calibrate") action GamepadCalibrate() xalign 0.3 ypos 50 #this bit is might need trimming or rework style help_button is gui_button @@ -1799,8 +1792,8 @@ define bubble.expand_area = { ################################################################################ style pref_vbox: - variant "medium" - xsize 675 + variant ["mobile", "steam_deck"] + xsize 600 ## 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. @@ -1834,6 +1827,137 @@ screen quick_menu(): [ _("Menu"), ShowMenu(), NullAction() ] \ ] ) +screen preferences(): + variant "mobile" + tag menu + + use game_menu(_("Options"), scroll="viewport"): + vbox: + hbox: + box_wrap True + + vbox: + style_prefix "radio" + label _("Rollback Side") + textbutton _("Disable") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "disable") + textbutton _("Left") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "left") + textbutton _("Right") activate_sound "audio/ui/uiOptionOn.wav" action Preference("rollback side", "right") + vbox: + style_prefix "check" + label _("Naughty Stuff") + textbutton _("Enable Lewd Images") action [Function(onclick_audio, persistent.lewd), ToggleVariable("persistent.lewd", True, False)] + + vbox: + style_prefix "check" + label _("Skip") + textbutton _("Unseen Text") action [Function(onclick_audio, preferences.skip_unseen), ToggleVariable("preferences.skip_unseen", True, False)] + textbutton _("After Choices") action [Function(onclick_audio, preferences.skip_after_choices), ToggleVariable("preferences.skip_after_choices", True, False)] + textbutton _("Transitions") action [Function(onclick_audio, preferences.transitions, True), ToggleVariable("preferences.transitions", 0, 2)] + + vbox: + style_prefix "check" + label _("Developer Tools") + textbutton _("Enable Debug Scores") action ToggleVariable("persistent.enable_debug_scores", True, False) + textbutton _("Enable Chapter Select") action ToggleVariable("persistent.enable_chapter_select", True, False) + + if not main_menu: + if persistent.enable_debug_scores: + $ debug_story_variables(False) + $ debug_story_variables(True) + else: + $ debug_story_variables(False) + + vbox: + style_prefix "check" + label _("Mods") + textbutton _("Show Mod Screenshots") action [Function(onclick_audio, persistent.show_mod_screenshots), ToggleVariable("persistent.show_mod_screenshots", True, False)] + textbutton _("Enable New Mods") action [Function(onclick_audio, persistent.newmods_default_state), ToggleVariable("persistent.newmods_default_state", True, False)] + + if renpy.seen_image("big ending"): + vbox: + style_prefix "radio" + label _("Menu Style") + textbutton _("Original") activate_sound "audio/ui/uiOptionOn.wav" action SetVariable("persistent.use_epilogue_menu", False) + textbutton _("Epilogue") activate_sound "audio/ui/uiOptionOn.wav" action SetVariable("persistent.use_epilogue_menu", True) + + vbox: + xsize 676 + style_prefix "check" + label _("Language") + vpgrid: + rows len(languages) + cols 1 + mousewheel True + draggable True + xsize 570 + ysize 300 + if len(languages)>4: + scrollbars "vertical" + for lang in languages: + fixed: + ysize 80 + use lang_button(lang) + + ## Additional vboxes of type "radio_pref" or "check_pref" can be + ## added here, to add additional creator-defined preferences. + + null height (4 * gui.pref_spacing) + + hbox: + style_prefix "slider" + + vbox: + + label _("Text Speed") + + bar value Preference("text speed") + + label _("Auto-Forward Time{#Mobile}") + + bar value Preference("auto-forward time") + + vbox: + + if config.has_music: + label _("Music Volume") + hbox: + bar value Preference("music volume") #yalign 0.5 + textbutton _("Reset{#Mobile}"): + action Function(preferences.set_mixer, 'music', config.default_music_volume) + + if config.has_sound: + + label _("Sound Volume") + hbox: + bar value Preference("sfx volume") #yalign 0.5 + textbutton _("Reset{#Mobile}"): + action Function(preferences.set_mixer, 'sfx', config.default_sfx_volume) + if config.sample_sound: + textbutton _("Test") action Play("sound", config.sample_sound) + + label _("UI Sounds Volume") + hbox: + bar value Preference("ui volume") #yalign 0.5 + textbutton _("Reset{#Mobile}"): + yalign 0.5 + action Function(preferences.set_mixer, 'ui', config.default_sfx_volume) + + if config.has_voice: + label _("Voice Volume") + hbox: + bar value Preference("voice volume") #yalign 0.5 + textbutton _("Reset{#Mobile}"): + yalign 0.5 + action Function(preferences.set_mixer, 'voice', config.default_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 _("Mute All"): + action Preference("all mute", "toggle") + style "mute_all_button" + style radio_button: variant "mobile" foreground "gui/phone/button/radio_[prefix_]foreground.png" @@ -1904,4 +2028,8 @@ style slider_pref_vbox: style slider_pref_slider: variant "mobile" - xsize 900 + xsize 600 + +style slider_vbox: + variant ["mobile", "steam_deck"] + xsize 600 \ No newline at end of file