Add quick buttons & indent the script
This commit is contained in:
BIN
game/audio/ui/uiBack.wav
Normal file
BIN
game/audio/ui/uiBack.wav
Normal file
Binary file not shown.
BIN
game/audio/ui/uiClick.wav
Normal file
BIN
game/audio/ui/uiClick.wav
Normal file
Binary file not shown.
BIN
game/audio/ui/uiFail.wav
Normal file
BIN
game/audio/ui/uiFail.wav
Normal file
Binary file not shown.
BIN
game/audio/ui/uiNotification.wav
Normal file
BIN
game/audio/ui/uiNotification.wav
Normal file
Binary file not shown.
BIN
game/audio/ui/uiOptionOff.wav
Normal file
BIN
game/audio/ui/uiOptionOff.wav
Normal file
Binary file not shown.
BIN
game/audio/ui/uiOptionOn.wav
Normal file
BIN
game/audio/ui/uiOptionOn.wav
Normal file
Binary file not shown.
BIN
game/audio/ui/uiRollover.wav
Normal file
BIN
game/audio/ui/uiRollover.wav
Normal file
Binary file not shown.
@ -49,7 +49,7 @@ define gui.hover_muted_color = u'#7a003d'
|
|||||||
|
|
||||||
## The colors used for dialogue and menu choice text.
|
## The colors used for dialogue and menu choice text.
|
||||||
define gui.text_color = '#ffffff'
|
define gui.text_color = '#ffffff'
|
||||||
define gui.interface_text_color = '#00000000'
|
define gui.interface_text_color = '#fff'
|
||||||
|
|
||||||
define gui.text_color_outline = '#000'
|
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.page_button_borders = Borders(15, 6, 15, 6)
|
||||||
|
|
||||||
define gui.quick_button_borders = Borders(15, 6, 15, 0)
|
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_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
|
define gui.quick_button_text_selected_color = gui.accent_color
|
||||||
|
|
||||||
## You can also add your own customizations, by adding properly-named variables.
|
## You can also add your own customizations, by adding properly-named variables.
|
||||||
|
BIN
game/gui/button/uioptionbuttons/template_hover.png
Normal file
BIN
game/gui/button/uioptionbuttons/template_hover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
game/gui/button/uioptionbuttons/template_idle.png
Normal file
BIN
game/gui/button/uioptionbuttons/template_idle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
@ -98,6 +98,8 @@ style frame:
|
|||||||
screen say(who, what):
|
screen say(who, what):
|
||||||
style_prefix "say"
|
style_prefix "say"
|
||||||
|
|
||||||
|
use quick_menu
|
||||||
|
|
||||||
window:
|
window:
|
||||||
id "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
|
## The quick menu is displayed in-game to provide easy access to the out-of-game
|
||||||
## menus.
|
## 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():
|
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.
|
## Ensure this appears on top of other screens.
|
||||||
zorder 100
|
zorder 100
|
||||||
|
|
||||||
|
2565
game/script.rpy
2565
game/script.rpy
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user