We are working on a Game for Renpy. It's almost finished but there's a problem with the gallery.
The following code (in the attachment) displays three Character Avatars, when i tap on them i want an action to start (in this case switch to another screen)
i tried to to the following:
add g.make_button("end2", "gui/win_thumb_0201_L.png", xalign=0.5, yalign=0.5) action ShowMenu('page5')
but it says "action is not a keyword argument or valid child for the add statement."
Does anyone know how to assign an action to this button?
Thank you in common.
Assign Action to g.button.make
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.
-
- Newbie
- Posts: 4
- Joined: Wed May 27, 2015 1:31 am
- Contact:
- kitsalai
- Regular
- Posts: 65
- Joined: Wed Jan 08, 2014 11:05 pm
- Projects: Imaginatum
- Location: US
- Contact:
Re: Assign Action to g.button.make
The make_button() function of Gallery has a predefined action of displaying the image to the user. I don't think it's possible to change its action.
What you're looking for is an imagebutton (http://www.renpy.org/doc/html/screens.html#imagebutton) It functions similar to textbutton and you can assign your ShowMenu() action to it. I haven't tested it myself, but I'm sure you can figure it out.
What you're looking for is an imagebutton (http://www.renpy.org/doc/html/screens.html#imagebutton) It functions similar to textbutton and you can assign your ShowMenu() action to it. I haven't tested it myself, but I'm sure you can figure it out.
-
- Newbie
- Posts: 4
- Joined: Wed May 27, 2015 1:31 am
- Contact:
Re: Assign Action to g.button.make
Thank you very much for clearing that up! I successfully switched to imagebuttons!kitsalai wrote:The make_button() function of Gallery has a predefined action of displaying the image to the user. I don't think it's possible to change its action.
What you're looking for is an imagebutton (http://www.renpy.org/doc/html/screens.html#imagebutton) It functions similar to textbutton and you can assign your ShowMenu() action to it. I haven't tested it myself, but I'm sure you can figure it out.
Who is online
Users browsing this forum: piinkpuddiin