How to use image on imagebutton

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
oldhiccup
Newbie
Posts: 14
Joined: Thu Jan 28, 2021 8:27 pm
Contact:

How to use image on imagebutton

#1 Post by oldhiccup »

I've been trying to do something stupidly simple, use an image in the imagebutton, so that the code is reused, but it just doesn't work.
1- my first step, i defined one image.

Code: Select all

#buttons
image button_enter = "gui/button/enter.png"
2- my second step, i use image on image button

Code: Select all

        imagebutton:
            idle button_enter
3- My result
NameError: name "button_enter" is not defined

oldhiccup
Newbie
Posts: 14
Joined: Thu Jan 28, 2021 8:27 pm
Contact:

Re: How to use image on imagebutton

#2 Post by oldhiccup »

My mistake, a silly mistake, the image needs to be in quotes. lol sorry.

cheonbyeol
Regular
Posts: 37
Joined: Thu Feb 04, 2021 9:04 am
Contact:

Re: How to use image on imagebutton

#3 Post by cheonbyeol »

Side note: I think you should be posting these kind of questions in the Ren'Py Questions and Announcements subforum.

oldhiccup
Newbie
Posts: 14
Joined: Thu Jan 28, 2021 8:27 pm
Contact:

Re: How to use image on imagebutton

#4 Post by oldhiccup »

cheonbyeol wrote: Tue Feb 16, 2021 2:29 pm Side note: I think you should be posting these kind of questions in the Ren'Py Questions and Announcements subforum.
Sorry man, Thanks for the help, I hadn't noticed you were on the wrong topic.

Post Reply

Who is online

Users browsing this forum: No registered users