Gallery buttons

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
User avatar
Keinart
Regular
Posts: 132
Joined: Sun May 13, 2012 8:28 pm
Completed: One Thousand Lies
Projects: Lotus Reverie
Organization: Keinart Lobre
Tumblr: keinart
itch: keinart
Location: Spain
Contact:

Gallery buttons

#1 Post by Keinart » Wed Jun 06, 2012 2:40 pm

Ok I'm pretty much stupid and I can't really get the code from http://www.renpy.org/doc/html/rooms.html so let me ask a few questions.
With this method your are supposed to add buttons with images and then you only need to put those buttons in the gallery screen menu, am I right?

So, for example for the first button they use as example:

Code: Select all

    g.button("dawn")
    g.image("dawn1")
    g.unlock("dawn1")
It's as easy as change "dawn1" in g.image for the image do you want to display, and for unlock exactly the same, actually you can even use g.unlock_image that is the same. Is this correct?

So after this, we have the following in the screen:

Code: Select all

        add g.make_button("dawn", "gal-dawn.png", xalign=0.5, yalign=0.5)
For the "gal-dawn.png" I only need to change it for a picture of the button itself, but I don't see any code to click on the button so the full picture I added before will be displayed. The gallery menu works perfect for me but there's no command to click on the image and display the full picture. Am I missing something?

Thanks for reading, I know this is probably something really easy but I'm really bad with the code lol

User avatar
Keinart
Regular
Posts: 132
Joined: Sun May 13, 2012 8:28 pm
Completed: One Thousand Lies
Projects: Lotus Reverie
Organization: Keinart Lobre
Tumblr: keinart
itch: keinart
Location: Spain
Contact:

Re: Gallery buttons

#2 Post by Keinart » Fri Jun 08, 2012 3:21 pm

Seems I didn't it explain well at all :lol:

I just want to know how the make_button ( http://www.renpy.org/doc/html/rooms.htm ... ake_button ) works, because I cant show any images with it and it's driving me crazy.

Thanks

User avatar
Alex
Lemma-Class Veteran
Posts: 2472
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Gallery buttons

#3 Post by Alex » Fri Jun 08, 2012 4:54 pm

Do you have any error message? 'Cause <add g.make_button("dawn", "gal-dawn.png", xalign=0.5, yalign=0.5)> should show a button that will show you image named "dawn1" (as you defined it <g.image("dawn1")>). Also, do you have <image dawn1 = "imagename.png"> in your init block?

User avatar
eesy
Regular
Posts: 39
Joined: Mon May 14, 2012 3:30 am
Contact:

Re: Gallery buttons

#4 Post by eesy » Mon Jun 11, 2012 8:52 am

I'm epic noob!

User avatar
Keinart
Regular
Posts: 132
Joined: Sun May 13, 2012 8:28 pm
Completed: One Thousand Lies
Projects: Lotus Reverie
Organization: Keinart Lobre
Tumblr: keinart
itch: keinart
Location: Spain
Contact:

Re: Gallery buttons

#5 Post by Keinart » Mon Jun 11, 2012 2:25 pm

Alex wrote:Do you have any error message? 'Cause <add g.make_button("dawn", "gal-dawn.png", xalign=0.5, yalign=0.5)> should show a button that will show you image named "dawn1" (as you defined it <g.image("dawn1")>). Also, do you have <image dawn1 = "imagename.png"> in your init block?
I completely forgot about the image in the the init block!!!!!

That was SO stupid for me. Thank you very much for your help, now it works :D

User avatar
kukiko-tan
Regular
Posts: 62
Joined: Tue Jul 10, 2012 12:28 pm
Completed: Fear Not
Projects: The Song of the Caged Crow, Revealed Royalty, The Golden Seed
Organization: RONI
Deviantart: kukiko-tan
Contact:

Re: Gallery buttons

#6 Post by kukiko-tan » Tue Jul 10, 2012 12:31 pm

Excuse me, what does init block mean? :oops:
I'm having the same problem .

User avatar
Alex
Lemma-Class Veteran
Posts: 2472
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Gallery buttons

#7 Post by Alex » Tue Jul 10, 2012 12:59 pm

You can read about it here - http://www.renpy.org/wiki/renpy/doc/tut ... _Structure
But it's better to begin from the beggining - http://www.renpy.org/wiki/renpy/doc/tut ... b_Tutorial

User avatar
kukiko-tan
Regular
Posts: 62
Joined: Tue Jul 10, 2012 12:28 pm
Completed: Fear Not
Projects: The Song of the Caged Crow, Revealed Royalty, The Golden Seed
Organization: RONI
Deviantart: kukiko-tan
Contact:

Re: Gallery buttons

#8 Post by kukiko-tan » Wed Jul 11, 2012 8:54 am

Thank you very much ~!

Post Reply

Who is online

Users browsing this forum: Google [Bot], SuperbowserX