Text Below Gallery Thumbnails?

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
Bigg_AASB
Newbie
Posts: 8
Joined: Wed Feb 27, 2019 12:40 am
Projects: As Above/So Below
Contact:

Text Below Gallery Thumbnails?

#1 Post by Bigg_AASB »

Is there a way to add text underneath thumbnails in a CG gallery? I'm putting together a gallery of concept art that'll unlock after players finish the demo of my game, and it'd be nice to throw a couple words underneath the thumbnails. I feel like this is something I could achieve if I understood the style stuff better, but if it's also just plain unachievable I'd appreciate knowing that too!

What I've got right now:

Image

What I'd like to achieve:

Image

Also here's the code for my gallery (heavily cribbed from the tutorial from the official documentation, natch):

Code: Select all

init python:

    g = Gallery()

    g.button("bonus1")
    g.image("space", "unlock1")

    g.button("bonus2")
    g.image("space", "unlock2")

    g.button("bonus3")
    g.image("space", "unlock3")

    g.button("bonus4")
    g.image("space", "unlock4")

    g.button("bonus5")
    g.image("space", "unlock5")

    g.button("bonus6")
    g.image("space", "unlock6")

    g.button("bonus7")
    g.image("space", "unlock7")

    g.button("bonus8")
    g.image("space", "unlock8")

    g.transition = dissolve

screen gallery:

    tag menu

    add "space"

    grid 3 3:

        xfill True
        yfill True

        add g.make_button("bonus1", "unlockThumb1", "lockedImage", hover_border='#fcf80580', xalign=0.5, yalign=0.5)
        add g.make_button("bonus2", "unlockThumb2", "lockedImage", hover_border='#fcf80580', xalign=0.5, yalign=0.5)
        add g.make_button("bonus3", "unlockThumb3", "lockedImage", hover_border='#fcf80580', xalign=0.5, yalign=0.5)

        add g.make_button("bonus4", "unlockThumb4", "lockedImage", hover_border='#fcf80580', xalign=0.5, yalign=0.5)
        add g.make_button("bonus5", "unlockThumb5", "lockedImage", hover_border='#fcf80580', xalign=0.5, yalign=0.5)
        add g.make_button("bonus6", "unlockThumb6", "lockedImage", hover_border='#fcf80580', xalign=0.5, yalign=0.5)

        add g.make_button("bonus7", "unlockThumb7", "lockedImage", hover_border='#fcf80580', xalign=0.5, yalign=0.5)
        add g.make_button("bonus8", "unlockThumb8", "lockedImage", hover_border='#fcf80580', xalign=0.5, yalign=0.5)

        textbutton "Return" action Return() xalign 0.5 yalign 0.5

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Text Below Gallery Thumbnails?

#2 Post by isobellesophia »

Code: Select all

add g.make_button("bonus1", "unlockThumb1", "lockedImage", hover_border='#fcf80580', xalign=0.5, yalign=0.5, text="Big boy" xpos 50 ypos 200)
Or

Code: Select all

add g.make_button("bonus1", "unlockThumb1", "lockedImage", hover_border='#fcf80580', xalign=0.5, yalign=0.5, text("Big boy") xpos 50 ypos 200)
Try that for example, not tested yet..

(Not really good at coding those, so try! :)
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
Bigg_AASB
Newbie
Posts: 8
Joined: Wed Feb 27, 2019 12:40 am
Projects: As Above/So Below
Contact:

Re: Text Below Gallery Thumbnails?

#3 Post by Bigg_AASB »

Unfortunately, both of those returned a syntax error. Thanks for the suggestions, though!

Post Reply

Who is online

Users browsing this forum: No registered users