{SOLVED} Can't get sound test button to work
Posted: Thu Dec 12, 2019 4:56 am
This is what my current Preferences/Settings screen code looks like:
# Preferences
#
# Screen that allows the user to change the preferences.
# http://www.renpy.org/doc/html/screen_sp ... prefereces
screen preferences:
tag menu
# The background of the menu.
window:
add "settings_screen"
# Include the navigation.
use quick_menu5
# Put the navigation columns in a three-wide grid.
grid 3 1:
style_group "prefs"
xfill True
# The left column.
vbox:
frame:
style_group "pref"
has vbox
label _("Display")
textbutton _("Window") action Preference("display", "window")
textbutton _("Fullscreen") action Preference("display", "fullscreen")
frame:
style_group "pref"
has vbox
label _("Transitions")
textbutton _("All") action Preference("transitions", "all")
textbutton _("None") action Preference("transitions", "none")
frame:
style_group "pref"
has vbox
label _("Text Speed")
bar value Preference("text speed")
vbox:
frame:
style_group "pref"
has vbox
label _("Skip")
textbutton _("Seen Messages") action Preference("skip", "seen")
textbutton _("All Messages") action Preference("skip", "all")
frame:
style_group "pref"
has vbox
label _("After Choices")
textbutton _("Stop Skipping") action Preference("after choices", "stop")
textbutton _("Keep Skipping") action Preference("after choices", "skip")
frame:
style_group "pref"
has vbox
label _("Auto-Forward Time")
bar value Preference("auto-forward time")
if config.has_voice:
textbutton _("Wait for Voice") action Preference("wait for voice", "toggle")
vbox:
frame:
style_group "pref"
has vbox
label _("Music Volume")
bar value Preference("music volume")
frame:
style_group "pref"
has vbox
label _("Sound Volume")
bar value Preference("sound volume")
if config.sample_sound:
textbutton _("Test"):
action Play("sound", config.sample_sound)
style "soundtest_button"
frame:
style_group "pref"
has vbox
textbutton _("Joystick...") action Preference("joystick")
init -2 python:
style.pref_frame.xfill = True
style.pref_frame.xmargin = 25
style.pref_frame.top_margin = 35
style.pref_button_text.color = "#fff"
style.pref_button_text.size = 12
style.pref_button_text.font = "LoveYaLikeASister.ttf"
style.pref_button_text.outlines = [(2, "#000000", 0, 0)]
style.pref_button_text.hover_outlines = [(2, "#C700B3", 0, 0)]
style.pref_button_text.selected_outlines = [(2, "#00D1FB", 0, 0)]
style.pref_button_text.selected_hover_outlines = [(2, "#FA0D00", 0, 0)]
style.pref_vbox.xfill = True
style.pref_button.size_group = "pref"
style.pref_button.xalign = 0.5
style.pref_button.background = Frame("button_Idle.png",10,10)
style.pref_button.hover_background = Frame("button_Hover.png",10,10)
style.pref_button.selected_background = Frame("button_Idle.png",10,10)
style.pref_button.selected_hover_background = Frame("button_Selected.png",10,10)
style.pref_button.yminimum = 30
style.pref_slider.xmaximum = 192
style.pref_slider.xalign = 0.5
style.pref_slider.left_bar = "left.png"
style.pref_slider.right_bar = "right.png"
style.pref_slider.hover_left_bar = "left_hover.png"
style.pref_slider.ymaximum = 20
style.pref_slider.xmaximum = 180
style.soundtest_button.xalign = 0.0
style.pref_frame.background = Frame("grunge-scratches2.jpg")
For some reason, I just cannot get the sound test button to show up. Could it be because I can't get music or sounds recognized? What do I do about this?
# Preferences
#
# Screen that allows the user to change the preferences.
# http://www.renpy.org/doc/html/screen_sp ... prefereces
screen preferences:
tag menu
# The background of the menu.
window:
add "settings_screen"
# Include the navigation.
use quick_menu5
# Put the navigation columns in a three-wide grid.
grid 3 1:
style_group "prefs"
xfill True
# The left column.
vbox:
frame:
style_group "pref"
has vbox
label _("Display")
textbutton _("Window") action Preference("display", "window")
textbutton _("Fullscreen") action Preference("display", "fullscreen")
frame:
style_group "pref"
has vbox
label _("Transitions")
textbutton _("All") action Preference("transitions", "all")
textbutton _("None") action Preference("transitions", "none")
frame:
style_group "pref"
has vbox
label _("Text Speed")
bar value Preference("text speed")
vbox:
frame:
style_group "pref"
has vbox
label _("Skip")
textbutton _("Seen Messages") action Preference("skip", "seen")
textbutton _("All Messages") action Preference("skip", "all")
frame:
style_group "pref"
has vbox
label _("After Choices")
textbutton _("Stop Skipping") action Preference("after choices", "stop")
textbutton _("Keep Skipping") action Preference("after choices", "skip")
frame:
style_group "pref"
has vbox
label _("Auto-Forward Time")
bar value Preference("auto-forward time")
if config.has_voice:
textbutton _("Wait for Voice") action Preference("wait for voice", "toggle")
vbox:
frame:
style_group "pref"
has vbox
label _("Music Volume")
bar value Preference("music volume")
frame:
style_group "pref"
has vbox
label _("Sound Volume")
bar value Preference("sound volume")
if config.sample_sound:
textbutton _("Test"):
action Play("sound", config.sample_sound)
style "soundtest_button"
frame:
style_group "pref"
has vbox
textbutton _("Joystick...") action Preference("joystick")
init -2 python:
style.pref_frame.xfill = True
style.pref_frame.xmargin = 25
style.pref_frame.top_margin = 35
style.pref_button_text.color = "#fff"
style.pref_button_text.size = 12
style.pref_button_text.font = "LoveYaLikeASister.ttf"
style.pref_button_text.outlines = [(2, "#000000", 0, 0)]
style.pref_button_text.hover_outlines = [(2, "#C700B3", 0, 0)]
style.pref_button_text.selected_outlines = [(2, "#00D1FB", 0, 0)]
style.pref_button_text.selected_hover_outlines = [(2, "#FA0D00", 0, 0)]
style.pref_vbox.xfill = True
style.pref_button.size_group = "pref"
style.pref_button.xalign = 0.5
style.pref_button.background = Frame("button_Idle.png",10,10)
style.pref_button.hover_background = Frame("button_Hover.png",10,10)
style.pref_button.selected_background = Frame("button_Idle.png",10,10)
style.pref_button.selected_hover_background = Frame("button_Selected.png",10,10)
style.pref_button.yminimum = 30
style.pref_slider.xmaximum = 192
style.pref_slider.xalign = 0.5
style.pref_slider.left_bar = "left.png"
style.pref_slider.right_bar = "right.png"
style.pref_slider.hover_left_bar = "left_hover.png"
style.pref_slider.ymaximum = 20
style.pref_slider.xmaximum = 180
style.soundtest_button.xalign = 0.0
style.pref_frame.background = Frame("grunge-scratches2.jpg")
For some reason, I just cannot get the sound test button to show up. Could it be because I can't get music or sounds recognized? What do I do about this?