Give the mod menu the epilogue style.

Change the mod details pane to display the name of a mod if the display is set to "icon"
This commit is contained in:
Map 2024-10-06 21:46:08 -05:00
parent fd21e45713
commit b8d8a00f44
3 changed files with 29 additions and 30 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -408,18 +408,6 @@ image bonus_flash:
repeat 4 repeat 4
image template_black_m = Composite(
(511, 129),
(6, 5), Crop((0, 0, 511-12, 129-12), Solid("#000000", width=2, height=2)),
(0, 0), "gui/button/menubuttons/template_idle.png",
(0, 0), "gui/button/menubuttons/template_idle.png"
)
image template_black:
"template_black_m"
matrixcolor TintMatrix(Color((0, 0, 0)))
alpha 0.8
screen bonus_chapter_button(f="gui/button/menubuttons/template_idle.png"): screen bonus_chapter_button(f="gui/button/menubuttons/template_idle.png"):
#("gui/button/menubuttons/template_idle.png", "Bonus Chapters", ShowMenu("ex_ch_menu")) #("gui/button/menubuttons/template_idle.png", "Bonus Chapters", ShowMenu("ex_ch_menu"))
button: button:

View file

@ -685,11 +685,9 @@ screen mod_menu():
style_prefix "main_menu" style_prefix "main_menu"
add gui.main_menu_background use main_menu_background
frame:
xsize 420 $ main_menu_button_img = "gui/button/menubuttons/template_idle_epilogue.png" if persistent.use_epilogue_menu else "gui/button/menubuttons/template_idle.png"
yfill True
background "gui/overlay/main_menu.png"
default mod_metadata = {} default mod_metadata = {}
default reload_game = False default reload_game = False
@ -707,14 +705,14 @@ screen mod_menu():
spacing 8 spacing 8
use mod_menu_top_buttons(_("Reload Mods"), SetScreenVariable("reload_game", True)): use mod_menu_top_buttons(main_menu_button_img, _("Reload Mods"), SetScreenVariable("reload_game", True)):
# For some reason, Function() will instantly reload the game upon entering the mod menu, and put it in an infinite loop, so doing this python jank # For some reason, Function() will instantly reload the game upon entering the mod menu, and put it in an infinite loop, so doing this python jank
# is the only way # is the only way
if reload_game: if reload_game:
python: python:
reload_game = False reload_game = False
renpy.reload_script() renpy.reload_script()
use mod_menu_top_buttons(_("Return"), ShowMenu("extras")) use mod_menu_top_buttons(main_menu_button_img, _("Return"), ShowMenu("extras"))
viewport: viewport:
xpos 1260 xpos 1260
@ -755,13 +753,16 @@ screen mod_menu():
activate_sound "audio/ui/snd_ui_click.wav" activate_sound "audio/ui/snd_ui_click.wav"
idle_foreground Transform("gui/button/menubuttons/up.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#445ABB")) if persistent.use_epilogue_menu:
idle_foreground Transform("gui/button/menubuttons/up.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#000000"))
else:
idle_foreground Transform("gui/button/menubuttons/up.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#445ABB"))
hover_foreground Transform("gui/button/menubuttons/up.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#00FF03")) hover_foreground Transform("gui/button/menubuttons/up.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#00FF03"))
action Function(swapMods, i, i-1) action Function(swapMods, i, i-1)
else: else:
add Null(30,30) at truecenter add Null(30,30) at truecenter
# Enablin/disabling mods button # Enabling/disabling mods button
button: button:
at truecenter at truecenter
style_prefix "main_menu" style_prefix "main_menu"
@ -770,7 +771,10 @@ screen mod_menu():
if not renpy.variant(["mobile", "steam_deck"]): if not renpy.variant(["mobile", "steam_deck"]):
ysize 65 ysize 65
add "gui/button/menubuttons/checkbox.png" xalign 0.5 yalign 0.5 if persistent.use_epilogue_menu:
add "gui/button/menubuttons/checkbox_epilogue.png" xalign 0.5 yalign 0.5
else:
add "gui/button/menubuttons/checkbox.png" xalign 0.5 yalign 0.5
if x["Scripts"]: if x["Scripts"]:
action Function(toggle_persistent_mods, i) action Function(toggle_persistent_mods, i)
@ -792,7 +796,10 @@ screen mod_menu():
action Function(swapMods, i, i+1) action Function(swapMods, i, i+1)
activate_sound "audio/ui/snd_ui_click.wav" activate_sound "audio/ui/snd_ui_click.wav"
idle_foreground Transform("gui/button/menubuttons/down.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#445ABB")) if persistent.use_epilogue_menu:
idle_foreground Transform("gui/button/menubuttons/down.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#000000"))
else:
idle_foreground Transform("gui/button/menubuttons/down.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#445ABB"))
hover_foreground Transform("gui/button/menubuttons/down.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#00FF03")) hover_foreground Transform("gui/button/menubuttons/down.png",xalign=0.5,yalign=0.5,matrixcolor=TintMatrix("#00FF03"))
else: else:
@ -827,9 +834,9 @@ screen mod_menu():
xsize 475 xsize 475
ymaximum 2000 ymaximum 2000
if mod_button_enabled: if mod_button_enabled:
background Frame("gui/button/menubuttons/template_idle.png", 12, 12) background Frame(main_menu_button_img, 12, 12)
else: else:
background Transform(Frame("gui/button/menubuttons/template_idle.png", 12, 12),matrixcolor=SaturationMatrix(0.5)) background Transform(Frame(main_menu_button_img, 12, 12),matrixcolor=SaturationMatrix(0.5))
padding (5, 5) padding (5, 5)
@ -870,7 +877,7 @@ screen mod_menu():
frame: frame:
xsize 475 xsize 475
ymaximum 2000 ymaximum 2000
background Frame("gui/button/menubuttons/template_idle.png", 12, 12) background Frame(main_menu_button_img, 12, 12)
padding (5, 5) padding (5, 5)
text x["Name"] xalign 0.5 yalign 0.5 size 34 textalign 0.5 text x["Name"] xalign 0.5 yalign 0.5 size 34 textalign 0.5
@ -903,7 +910,10 @@ screen mod_menu():
xsize 1190 xsize 1190
ysize 129 ysize 129
background Frame("gui/button/menubuttons/template_full_idle.png", 12, 12) if persistent.use_epilogue_menu:
background Frame("gui/button/menubuttons/template_idle_epilogue.png", 12, 12)
else:
background Frame("gui/button/menubuttons/template_full_idle.png", 12, 12)
text _("Start") xalign 0.5 yalign 0.5 size 50 text _("Start") xalign 0.5 yalign 0.5 size 50
action Start(mod_metadata["Label"]) action Start(mod_metadata["Label"])
@ -946,7 +956,8 @@ screen mod_menu():
# Mod details # Mod details
# Omits checking for mod name, since we'll always have some kind of mod name. # Omits checking for mod name, since we'll always have some kind of mod name.
# This will also not show anything if there's only a mod name, since we already show one in the mod button. # This will also not show anything if there's only a mod name, since we already show one in the mod button.
if return_translated_metadata(mod_metadata, "Version") != None or return_translated_metadata(mod_metadata, "Authors") != None or return_translated_metadata(mod_metadata, "Links") != None: # Unless the display is set to "icon".
if return_translated_metadata(mod_metadata, "Version") != None or return_translated_metadata(mod_metadata, "Authors") != None or return_translated_metadata(mod_metadata, "Links") != None or mod_metadata.get("Display") == "icon":
frame: frame:
background Frame("gui/mod_frame.png", 30, 30) background Frame("gui/mod_frame.png", 30, 30)
padding (30, 30) padding (30, 30)
@ -1064,13 +1075,13 @@ screen mod_screenshot_preview(img):
key ["mouseup_1", "mouseup_3"] action Hide("mod_screenshot_preview", dissolve) key ["mouseup_1", "mouseup_3"] action Hide("mod_screenshot_preview", dissolve)
screen mod_menu_top_buttons(text, action): screen mod_menu_top_buttons(image, text, action):
button: button:
frame: frame:
xmaximum 300 xmaximum 300
ymaximum 129 ymaximum 129
background Frame("gui/button/menubuttons/template_idle.png", 12, 12) background Frame(image, 12, 12)
text text xalign 0.5 yalign 0.5 size 34 text text xalign 0.5 yalign 0.5 size 34
action action action action