http://i.imgur.com/PfoTK4G.png
I have these imagebuttons in my main menu. And I have a "click.wav" file in "sound" folder. So I want my click to be heard, when I hover over the imagebuttons.
I typed in in options:
style.imagebutton.hover_sound = "sound/click.wav" but apparently it doesn't work.
Is there a different way to stylize these imagebuttons?
Imagebutton hover sound
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- 78909087
- Veteran
- Posts: 277
- Joined: Sat Aug 16, 2014 2:33 pm
- Completed: Dungeons and Don't Do It, Wake Up
- Projects: Lethe
- IRC Nick: Pacermist
- Contact:
Re: Imagebutton hover sound
While looking for a fix, I found this page. It lead me to this page, where it states the style properties for buttons.
Imagebuttons, under screen language are set up like this;
Perhaps try adding another function to it, like this. (I cannot test this at the moment)
This is just a quick help. If you're still confused after trying that information, feel free to reply.
Imagebuttons, under screen language are set up like this;
Code: Select all
screen gui_game_menu():
vbox xalign 1.0 yalign 1.0:
imagebutton auto "save_%s.png" action ShowMenu('save')
imagebutton auto "prefs_%s.png" action ShowMenu('preferences')
imagebutton auto "skip_%s.png" action Skip()
imagebutton auto "afm_%s.png" action Preference("auto-forward mode", "toggle")
Code: Select all
screen gui_game_menu():
vbox xalign 1.0 yalign 1.0:
imagebutton auto "save_%s.png" action ShowMenu('save') hovered Play("sound/click.wav")
imagebutton auto "prefs_%s.png" action ShowMenu('preferences') hovered Play("sound/click.wav")
imagebutton auto "skip_%s.png" action Skip() hovered Play("sound/click.wav")
imagebutton auto "afm_%s.png" action Preference("auto-forward mode", "toggle") hovered Play("sound/click.wav")
Re: Imagebutton hover sound
style.image_button.hover_sound = "sound/click.wav" (with an underscore between "image" and "button") will work.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]