Hey, I'm the guy from the similar thread Ocelot linked. He helped me with this too.
I've only gotten as far as replacing the textbutton with the imagebutton, so I can't really explain further than that. One thing i can bring though is a beginner's perspective.
I got the image to show up where the textbutton was with only one image file. mine is called "button 2_idle.png", meaning I didn't need a "button 2_idle.png" and a button 2_hover.png" to make it work. Just "button 2_idle.png"
I'm assuming that youre using Ren'Py 6.99.11 and when you clicked on your new game you chose the "New Gui", cuz that's what I did. I pretty sure that you can make everything work with everything, but I don't know that much about code to figure out those work arounds.
As far as making the image show up, replacing the text with an image, all you need to do is.
1: Create your image.
2: Make sure the "_idle" is at the end of the name of the actual image in your folder "yourimage_idle.png" (not in the screens.rpy). I put this image in my gui folder.
3: in the quick_menu section of the screens.rpy, replace the
Code: Select all
textbutton _("Prefs") action ShowMenu('preferences')
(I noticed the code you shared above was trying to change the Preference button, so I'm using that line as well).
with
Code: Select all
imagebutton auto "gui/yourimage_%s.png" action ShowMenu('preferences')
this is what my quick_menu block looks like and it worked for me. Again my image is called "button 2_idle.png"
Code: Select all
## Quick Menu screen
## The quick menu is displayed in-game to provide easy access to the out-of-game
## menus.
screen quick_menu():
# Ensure this appears on top of other screens.
zorder 100
# Add an in-game quick menu.
hbox:
style_prefix "quick"
xalign 0.5
yalign 1.0
textbutton _("Back") action Rollback()
textbutton _("History") action ShowMenu('history')
textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True)
textbutton _("Auto") action Preference("auto-forward", "toggle")
textbutton _("Save") action ShowMenu('save')
textbutton _("Q.Save") action QuickSave()
textbutton _("Q.Load") action QuickLoad()
imagebutton auto "gui/button 2_%s.png" action ShowMenu('preferences')
This is all I needed to make the imagebutton show up instead of the textbutton. With this code right here, I see the default textbuttons, but instead of "Prefs" is my image button. I actually made another folder inside my gui folder called imagebuttons, and that worked too as long as I typed "gui/imagebuttons/button 2_%s.png"
Now, I noticed that you're code pretty much looks exactly like this and it still threw you errors, so all I can suggest is to make sure that your image is in the right folder, that the Ren'Py launcher itself is pointing to the right directory. (Preferences >> Launcher Preferences >> Projects Directory >> Where the folder of your current version of renpy resides), and triple and quadruple check for any typos.
Hope this helps, cuz this is all the advice i can give