fix android mod buttons

This commit is contained in:
Map 2024-10-07 18:14:12 -05:00
parent 033175500c
commit 5d44682f49

View file

@ -1028,6 +1028,23 @@ screen mod_menu():
# Mod play and hide mod details pane buttons for android
if needs_android_buttons:
hbox:
box_reverse True
if len(mod_menu_errorcodes) != 0:
button:
frame:
xfill True
yfill True
if mod_metadata.get("Label") != None:
xmaximum 0.5
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 _("Show Errors") xalign 0.5 yalign 0.5 size 50 outlines [ (absolute(1), "#000", absolute(0), absolute(0)) ]
action SetScreenVariable("mod_metadata", {})
activate_sound "audio/ui/snd_ui_click.wav"
if mod_metadata.get("Label") != None:
$ mod_button_alpha = 1.0 if mod_metadata["Enabled"] == True else 0.4 # Fade mod button out if mod is disabled
button:
@ -1035,26 +1052,17 @@ screen mod_menu():
alpha mod_button_alpha
frame:
xfill True
yfill True
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 outlines [ (absolute(1), "#000", absolute(0), absolute(0)) ]
text _("Start") xalign 0.5 yalign 0.5 size 50 outlines [ (absolute(1), "#000", absolute(0), absolute(0)) ]
action Start(mod_metadata["Label"])
activate_sound "audio/ui/snd_ui_click.wav"
if len(mod_menu_errorcodes) != 0:
button:
frame:
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 _("Show Errors") xalign 0.5 yalign 0.5 size 50 outlines [ (absolute(1), "#000", absolute(0), absolute(0)) ]
action SetScreenVariable("mod_metadata", {})
activate_sound "audio/ui/snd_ui_click.wav"
if not persistent.seenModWarning:
$ persistent.seenModWarning = True