How can I make the image and label displayed within the same line

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
apoto
Newbie
Posts: 22
Joined: Thu Apr 26, 2018 11:32 am
Contact:

How can I make the image and label displayed within the same line

#1 Post by apoto » Fri Apr 27, 2018 1:28 pm

How can I make the Image displayed at the same line with the label like this?

┍━━━━━┑
┃Image ┃ Character Name
┕━━━━━┙

character description.

Code: Select all

screen character():
    tag menu



    use game_menu(_("character"), scroll="viewport"):

        style_prefix " character"

        has vbox:
            spacing 20

        if  Roman1 == True:
                image "romanthumb.png" 
                label "Roman"
                text _("That's me, a 32-year-old grey wolf.")
Thanks!

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: How can I make the image and label displayed within the same line

#2 Post by Remix » Fri Apr 27, 2018 2:42 pm

Put a fixed or hbox inside the vbox...

Code: Select all

        has vbox:
            spacing 20

        if  Roman1 == True:
                fixed: # using hbox would make both sides equal width, would not need xpos though
                    image "romanthumb.png" xpos 0
                    label "Roman" xpos 165 # <--- amend xpos
                # now back in the vbox, so basically on new line
                text _("That's me, a 32-year-old grey wolf.")    
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: No registered users