How to make choice box shorter each choice?

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
caibanh
Newbie
Posts: 20
Joined: Wed Jan 25, 2017 1:20 pm
Contact:

How to make choice box shorter each choice?

#1 Post by caibanh »

I see this choice style in the game name "I love you" make by Tyrano, and wonder if how to did it with Renpy...
Image

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

Re: How to make choice box shorter each choice?

#2 Post by Alex »

You can modify the choice screen, like

Code: Select all

screen choice(items):
    style_prefix "choice"

    vbox:
        for ind, i in enumerate(items):
            textbutton i.caption action i.action xsize (790 - 50 * ind) xalign 1.0
so each choice will be 50 pxls shorter than previous.

Code: Select all

# The game starts here.
label start:
    "..."
    menu:
        "Buy matcha pudding":
            pass
        "Buy yakisoba bread":
            pass
        "Buy jumbo cup romen":
            pass
        "Go home instead":
            pass
            
    "?!"

Post Reply

Who is online

Users browsing this forum: No registered users