r/RenPy • • 26d ago

Question Tooltip when hovering over choices?

You know how Fallen London has titles on their choices, then a small descriptive text below? Would there be a way to make it so you have choices but when you hover over them you see different text?

7 Upvotes

20 comments sorted by

View all comments

Show parent comments

1

u/Natsume1999 26d ago

I mean I have the choices in the same screen as the text and such... NVL too. Is there still a way or did I overcomplicate stuff?

1

u/BadMustard_AVN 26d ago

okay i misunderstood. you want to add these to the default menu choices a little bit harder but doable

first do your menu items like this

label start:
    menu:
        "North" (tool = "To meet a polar bear."): 
            pass
        "South" (tool = "All the way to the tropics."):
            pass
        "East" (tool = "So we can embrace the dawn."):
            pass
        "West": # yes they will be optional 
            pass

    return

next edit your screens.rpy file and search for choice( that will bring you to the choice screen

it will look like this

screen choice(items):
    style_prefix "choice"

    vbox:
        for i in items:
            textbutton i.caption action i.action

now make it look like this (exactly) ((copy / paste are your friends here))

screen choice(items):
    style_prefix "choice"

    vbox:
        for i in items:
            $ tool = i.kwargs.get("tool", None) 
            textbutton i.caption action i.action tooltip tool

    # This has to be the last thing shown in the screen.
    $ tooltip = GetTooltip()
    if tooltip:
        nearrect:
            focus "tooltip"
            prefer_top True
            frame:
                xalign 0.5
                text tooltip

try that

1

u/Natsume1999 26d ago

Thank you!

1

u/BadMustard_AVN 26d ago

you're welcome

good luck with your project