forked from Cavemanon/SnootGame
Clean up Mod Menu and other details
This commit is contained in:
@ -3,7 +3,9 @@
|
|||||||
label chapter_2_new:
|
label chapter_2_new:
|
||||||
show template_sample at scenter
|
show template_sample at scenter
|
||||||
"Sample Text"
|
"Sample Text"
|
||||||
|
|
||||||
hide template_sample
|
hide template_sample
|
||||||
|
play music 'audio/OST/Those Other Two Weirdos.ogg'
|
||||||
show anon neutral flip at aright with dissolve
|
show anon neutral flip at aright with dissolve
|
||||||
A "Sample Text"
|
A "Sample Text"
|
||||||
return
|
return
|
||||||
|
@ -4,7 +4,10 @@ init python:
|
|||||||
# All mod rpy files must have title of their mod (this shows up on a button)
|
# All mod rpy files must have title of their mod (this shows up on a button)
|
||||||
# and finally the label that controls the flow of dialogue
|
# and finally the label that controls the flow of dialogue
|
||||||
|
|
||||||
mod_menu_access += [["Example Mod", "storyline_ex"]];
|
mod_menu_access += [{
|
||||||
|
'Name': "Example Mod Name",
|
||||||
|
'Label': "storyline_ex"
|
||||||
|
}];
|
||||||
|
|
||||||
image template_sample = Image("mods/template/img/sample.png")
|
image template_sample = Image("mods/template/img/sample.png")
|
||||||
|
|
||||||
|
@ -263,7 +263,6 @@ screen quick_menu():
|
|||||||
zorder 100
|
zorder 100
|
||||||
if quick_menu:
|
if quick_menu:
|
||||||
window:
|
window:
|
||||||
background "gui/namebox.png"
|
|
||||||
xpos 1.45
|
xpos 1.45
|
||||||
ypos 0.977
|
ypos 0.977
|
||||||
vbox:
|
vbox:
|
||||||
@ -299,6 +298,7 @@ screen score_menu():
|
|||||||
init python:
|
init python:
|
||||||
config.overlay_screens.append("quick_menu")
|
config.overlay_screens.append("quick_menu")
|
||||||
|
|
||||||
|
|
||||||
default quick_menu = True
|
default quick_menu = True
|
||||||
|
|
||||||
style quick_button is default
|
style quick_button is default
|
||||||
@ -382,7 +382,7 @@ screen main_menu_button(filename, label, function):
|
|||||||
ymaximum 129
|
ymaximum 129
|
||||||
action function
|
action function
|
||||||
fixed:
|
fixed:
|
||||||
add filename xalign 0.5 yalign 0.5 zoom 1
|
add filename xalign 0.5 yalign 0.5 zoom 1 xanchor 0 xcenter 0.5 ycenter 0.5
|
||||||
text label xalign 0.5 yalign 0.5 xanchor 0.5
|
text label xalign 0.5 yalign 0.5 xanchor 0.5
|
||||||
|
|
||||||
# label_functions is [ [ "label", function() ], [ "foobar", foobar() ], .. ]
|
# label_functions is [ [ "label", function() ], [ "foobar", foobar() ], .. ]
|
||||||
@ -471,34 +471,76 @@ style main_menu_title:
|
|||||||
## Mod Menu screen ############################################################
|
## Mod Menu screen ############################################################
|
||||||
##
|
##
|
||||||
## Handles jumping to the mods scripts
|
## Handles jumping to the mods scripts
|
||||||
|
## Could be more lean but if this is going to one of last time I touch the UI,
|
||||||
|
## then fine by me
|
||||||
##
|
##
|
||||||
|
#similar to quick_button funcs
|
||||||
|
screen mod_menu_button(filename, label, function):
|
||||||
|
button:
|
||||||
|
xmaximum 600
|
||||||
|
ymaximum 129
|
||||||
|
action function
|
||||||
|
fixed:
|
||||||
|
add filename xalign 0.5 yalign 0.5 zoom 0.9
|
||||||
|
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 34
|
||||||
|
|
||||||
|
# arr is [{
|
||||||
|
# 'Name': string (name that appears on the button)
|
||||||
|
# 'Label': string (jump label)
|
||||||
|
# }, { .. } ]
|
||||||
|
# Reuse the same image string and keep things 'neat'.
|
||||||
|
screen mod_menu_buttons(filename, arr):
|
||||||
|
for x in arr:
|
||||||
|
use mod_menu_button(filename, x['Name'], Start(x['Label']))
|
||||||
|
|
||||||
screen mod_menu():
|
screen mod_menu():
|
||||||
|
|
||||||
tag menu
|
tag menu
|
||||||
|
|
||||||
|
style_prefix "main_menu"
|
||||||
|
|
||||||
|
add gui.main_menu_background
|
||||||
|
|
||||||
|
frame:
|
||||||
|
xsize 420
|
||||||
|
yfill True
|
||||||
|
background "gui/overlay/main_menu.png"
|
||||||
|
|
||||||
|
#side_yfill True
|
||||||
|
vbox:
|
||||||
|
xpos 1940
|
||||||
|
yalign 0.03
|
||||||
|
if persistent.splashtype == 1:
|
||||||
|
add "gui/sneedgame.png"
|
||||||
|
else:
|
||||||
|
add "gui/snootgame.png"
|
||||||
|
|
||||||
viewport:
|
viewport:
|
||||||
|
# this could be better but its ok for now
|
||||||
|
xpos 1885-540
|
||||||
|
xmaximum 540
|
||||||
|
ymaximum 0.8
|
||||||
|
ypos 200
|
||||||
yinitial 0
|
yinitial 0
|
||||||
scrollbars "vertical"
|
scrollbars "vertical"
|
||||||
mousewheel True
|
mousewheel True
|
||||||
draggable True
|
draggable True
|
||||||
pagekeys True
|
pagekeys True
|
||||||
|
|
||||||
#side_yfill True
|
|
||||||
vbox:
|
vbox:
|
||||||
spacing 10
|
#xpos 1885
|
||||||
xpos 1885
|
spacing 18
|
||||||
yalign 0.98
|
#yalign 0.98
|
||||||
|
|
||||||
use main_menu_button("gui/button/menubuttons/template_idle.png",
|
#buttons are messed up but that's ok
|
||||||
|
use mod_menu_button("gui/button/menubuttons/template_idle.png",
|
||||||
"Return", ShowMenu("main_menu"))
|
"Return", ShowMenu("main_menu"))
|
||||||
|
|
||||||
if len(mod_menu_access) is not 0:
|
if len(mod_menu_access) is not 0:
|
||||||
for x in mod_menu_access:
|
use mod_menu_buttons("gui/button/menubuttons/template_idle.png", mod_menu_access )
|
||||||
use main_menu_button("gui/button/menubuttons/template_idle.png",
|
|
||||||
x[0], Start(x[1]) )
|
|
||||||
else:
|
else:
|
||||||
use main_menu_button("gui/button/menubuttons/template_idle.png",
|
use mod_menu_button("gui/button/menubuttons/template_idle.png",
|
||||||
"You have no mods", None)
|
"You have no mods", None)
|
||||||
|
|
||||||
|
|
||||||
## Game Menu screen ############################################################
|
## Game Menu screen ############################################################
|
||||||
##
|
##
|
||||||
## This lays out the basic common structure of a game menu screen. It's called
|
## This lays out the basic common structure of a game menu screen. It's called
|
||||||
|
Reference in New Issue
Block a user