Add quick buttons & indent the script

This commit is contained in:
2022-03-06 07:31:53 +11:00
parent fa5e785547
commit a3939095d8
12 changed files with 1331 additions and 1285 deletions

BIN
game/audio/ui/uiBack.wav Normal file

Binary file not shown.

BIN
game/audio/ui/uiClick.wav Normal file

Binary file not shown.

BIN
game/audio/ui/uiFail.wav Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -49,7 +49,7 @@ define gui.hover_muted_color = u'#7a003d'
## The colors used for dialogue and menu choice text.
define gui.text_color = '#ffffff'
define gui.interface_text_color = '#00000000'
define gui.interface_text_color = '#fff'
define gui.text_color_outline = '#000'
@ -196,8 +196,10 @@ define gui.confirm_button_text_xalign = 0.5
define gui.page_button_borders = Borders(15, 6, 15, 6)
define gui.quick_button_borders = Borders(15, 6, 15, 0)
define gui.quick_button_text_color_outline = "#000"
define gui.quick_button_text_outlines = [ (absolute(1.0), gui.quick_button_text_color_outline, 0, 0) ]
define gui.quick_button_text_size = 21
define gui.quick_button_text_idle_color = gui.idle_small_color
define gui.quick_button_text_idle_color = "#fff"
define gui.quick_button_text_selected_color = gui.accent_color
## You can also add your own customizations, by adding properly-named variables.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -98,6 +98,8 @@ style frame:
screen say(who, what):
style_prefix "say"
use quick_menu
window:
id "window"
@ -238,8 +240,47 @@ style choice_button_text is default:
## The quick menu is displayed in-game to provide easy access to the out-of-game
## menus.
screen quick_button(filename, label, function):
button:
xsize 71
ysize 71
action function
if 'Return' in label or 'Back' in label or 'Menu' in label:
activate_sound "audio/ui/uiBack.wav"
else:
activate_sound "audio/ui/uiClick.wav"
fixed:
add filename xalign 0.5 yalign 0.5 zoom 1
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 22 style "quick_button_text"
# label_functions is [ [ "label", function() ], [ "foobar", foobar() ], .. ]
# Reuse the same image string and keep things 'neat'.
screen quick_buttons(filename, label_functions):
for l_f in label_functions:
use quick_button(filename, l_f[0], l_f[1])
image pink_button = im.MatrixColor("gui/button/uioptionbuttons/template_idle.png", im.matrix.hue(50))
screen quick_menu():
## Ensure this appears on top of other screens.
zorder 100
if quick_menu:
window:
xpos 1.45
ypos 1.012
vbox:
style_prefix "quick"
spacing 1
use quick_buttons("pink_button",
[
[ "Skip", Skip() ],
[ "Auto", Preference("auto-forward", "toggle") ],
[ "Back", Rollback() ]
] )
screen quick_old_menu():
## Ensure this appears on top of other screens.
zorder 100

View File

@ -1,3 +1,5 @@
init python:
renpy.music.register_channel("ambient","sfx",True,tight=True)
config.default_text_cps = 50
@ -8,10 +10,12 @@ init python:
return choices
label splashscreen:
python:
#play sound "audio/bongos.ogg"
$ renpy.movie_cutscene("images/Cavemanon_logo.webm")
renpy.movie_cutscene("images/Cavemanon_logo.webm")
#stop sound
jump start
config.overlay_screens.append("quick_menu")
Start()
init -1 python:
kwargs = {'who_xpos': 60,'who_ypos': 36}
@ -29,6 +33,7 @@ menu:
"No thank you":
"No Saucy bits Activated..."
$ lewd = False
return
"Yeah":
"Saucy bits Activated..."
@ -754,6 +759,7 @@ python:
('Keep going', 'going')]
#narrator("", interact=False)
renpy.jump(renpy.display_menu(randomize_choices(choices)))
label skip:
pause .5
@ -1156,7 +1162,6 @@ $ persistent.b_end = True
jump playAgain
label Neutral:
"Driving home, I think back to todays events."
@ -1388,7 +1393,6 @@ $ persistent.n_end = True
jump playAgain
label Good:
"On the way home, I stop by the ice cream place as promised."
@ -1748,7 +1752,6 @@ else:
label bonusend:
pause 1
play music 'audio/love_theme_simple.ogg' fadein 1