mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-01-22 17:26:20 +01:00
move mod buttons slightly higher, and create a seperate 'start' button for starting mods on Andoird
This commit is contained in:
parent
e54c950ef6
commit
aa0eff4377
2 changed files with 40 additions and 13 deletions
BIN
game/gui/button/menubuttons/template_full_idle.png
Normal file
BIN
game/gui/button/menubuttons/template_full_idle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
|
@ -696,11 +696,13 @@ screen mod_menu():
|
|||
# The top 2 buttons
|
||||
hbox:
|
||||
xpos 1272
|
||||
ypos 50
|
||||
ypos 30
|
||||
|
||||
spacing 8
|
||||
|
||||
use mod_menu_top_buttons(_("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
|
||||
# is the only way
|
||||
if reload_game:
|
||||
python:
|
||||
reload_game = False
|
||||
|
@ -709,9 +711,9 @@ screen mod_menu():
|
|||
|
||||
viewport:
|
||||
xpos 1260
|
||||
ypos 200
|
||||
xmaximum 600
|
||||
ymaximum 869
|
||||
ypos 180
|
||||
xmaximum 637
|
||||
ymaximum 889
|
||||
|
||||
scrollbars "vertical"
|
||||
vscrollbar_unscrollable "hide"
|
||||
|
@ -805,7 +807,8 @@ screen mod_menu():
|
|||
activate_sound "audio/ui/snd_ui_click.wav"
|
||||
hovered SetScreenVariable("mod_metadata", x)
|
||||
|
||||
if mod_button_enabled:
|
||||
# Clicking the mod button starts the mod on PC, but we have to click a seperate button to start on Android.
|
||||
if mod_button_enabled and not renpy.variant(["mobile", "steam_deck"]):
|
||||
action Start(x["Label"])
|
||||
else:
|
||||
action NullAction()
|
||||
|
@ -875,11 +878,37 @@ screen mod_menu():
|
|||
# Displays the mod metadata on the left side
|
||||
# This has two seperate viewports for error display because renpy is retarded
|
||||
if mod_metadata != {}:
|
||||
|
||||
# Mod play button for android
|
||||
# I'm too fuckin tired to make this not shit and just put this and the viewport into a vbox, forgive me
|
||||
$ mod_has_label_android = renpy.variant(["mobile", "steam_deck"]) and mod_metadata.get("Label") != None
|
||||
if mod_has_label_android:
|
||||
$ mod_button_alpha = 1.0 if mod_metadata["Enabled"] == True else 0.4 # Fade mod button out if mod is disabled
|
||||
button:
|
||||
xpos 13
|
||||
ypos 928
|
||||
transform:
|
||||
alpha mod_button_alpha
|
||||
frame:
|
||||
xsize 1190
|
||||
ysize 129
|
||||
|
||||
background Frame("gui/button/menubuttons/template_full_idle.png", 12, 12)
|
||||
text _("Start") xalign 0.5 yalign 0.5 size 50
|
||||
|
||||
action Start(mod_metadata["Label"])
|
||||
activate_sound "audio/ui/snd_ui_click.wav"
|
||||
|
||||
|
||||
# Mod details pane
|
||||
viewport:
|
||||
xmaximum 1190
|
||||
ymaximum 1030
|
||||
if mod_has_label_android:
|
||||
ymaximum 900
|
||||
else:
|
||||
ymaximum 1050
|
||||
xpos 15
|
||||
ypos 40
|
||||
ypos 15
|
||||
scrollbars "vertical"
|
||||
vscrollbar_unscrollable "hide"
|
||||
mousewheel True
|
||||
|
@ -989,9 +1018,9 @@ screen mod_menu():
|
|||
elif len(mod_menu_errorcodes) != 0:
|
||||
viewport:
|
||||
xmaximum 1190
|
||||
ymaximum 920
|
||||
xpos 10
|
||||
ypos 150
|
||||
ymaximum 1050
|
||||
xpos 15
|
||||
ypos 15
|
||||
scrollbars "vertical"
|
||||
vscrollbar_unscrollable "hide"
|
||||
mousewheel True
|
||||
|
@ -1034,9 +1063,7 @@ screen mod_menu_top_buttons(text, action):
|
|||
background Frame("gui/button/menubuttons/template_idle.png", 12, 12)
|
||||
text text xalign 0.5 yalign 0.5 size 34
|
||||
|
||||
# For some reason, Function() will instantly reload the game upon entering the mod menu, and put it in an infinite loop, so it's using a workaround
|
||||
# with this variable.
|
||||
action action
|
||||
activate_sound "audio/ui/snd_ui_click.wav"
|
||||
activate_sound "audio/ui/snd_ui_click.wav"
|
||||
|
||||
transclude
|
Loading…
Reference in a new issue