Making paginated Glossary? Also usage of image as entry 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
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Making paginated Glossary? Also usage of image as entry buttons

#1 Post by AERenoir »

I'm currently using this Encyclopaedia code from the cookbook: viewtopic.php?f=51&t=25204&start=90

The glossary screen I'm making is in the form of a dictionary or journal book that looks like this:
Image

I managed to imagemap the filter buttons and the background, but I'm not sure what to do to make pages instead of a scrolled list.
Also, the intention is to have each entry contain a short paragraph under a heading, like a news article or something. Just one sentence or two, as sort of "preview", and the full article is of course inside the entry itself. I looked up the Documentation and I can't see how I can do that unless I mess around with the base code itself. The built-in args for the entry looks like this:

Code: Select all

EncEntry(parent=None, number=None, name='', text='', subject='', viewed=False, viewed_persistent=False, locked=False, locked_persistent=False, image=None, locked_name='???', locked_text='???', locked_image=None, locked_image_tint=(0.0, 0.0, 0.0))
Do I put a whole paragraph into the "name"?

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Making paginated Glossary? Also usage of image as entry buttons

#2 Post by AERenoir »

Bump?

So what I'm looking for is probably: 1) How to make pages, 2) How to make each entry have a paragraph block instead of just a single entry name.
What I'm looking to create is a button that have this structure:

Image

The summary will not be part of the actual entry itself. Is it easier to make unique imagebuttons in the format that I want? Or is it better to type in the text?

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Making paginated Glossary? Also usage of image as entry buttons

#3 Post by Per K Grok »

AERenoir wrote: Sat Sep 26, 2020 6:45 am Bump?

So what I'm looking for is probably: 1) How to make pages, 2) How to make each entry have a paragraph block instead of just a single entry name.
What I'm looking to create is a button that have this structure:

Image

The summary will not be part of the actual entry itself. Is it easier to make unique imagebuttons in the format that I want? Or is it better to type in the text?

You could make a button that looks a bit like that this way.

Code: Select all

screen encyclopedia():
    button:
        area (100,100,400,300)
        action Jump("somewhere")
    frame:
        area (100,100,400,300)

        vbox:
            hbox:
                xalign 0.5
                label "Title"


            hbox:
                add "pix"
                text "A short summery A short summery A short summery A short summery"
For different pages I would probably use different screens. Changing page would be showing the new screen and hiding the old.

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: Making paginated Glossary? Also usage of image as entry buttons

#4 Post by AERenoir »

Oh, that's a start. I'll see if it works with the Cookbook encyclopaedia code, though. It has some premade settings that I'm rather afraid to mess with.

Post Reply

Who is online

Users browsing this forum: Google [Bot]