how to not show text box, but show screen [solved]

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
marionline
Newbie
Posts: 12
Joined: Sat Nov 07, 2020 3:41 pm
Contact:

how to not show text box, but show screen [solved]

#1 Post by marionline »

Hello!
I'd like to make a character gallery.
This is my first try.

The first question bothering me is how to not show the eileen text box, but only the character sheet?

Here is an image:
Image

And that is the code, made up from parts I found on the forum, docu and internet.

Code: Select all

# The script of the game goes in this file.

# Declare characters used by this game. The color argument colorizes the
# name of the character.

define e = Character("Eileen")
define email_1 = "800 years of trade agreements"

# The game starts here.

label start:

    # Show a background. This uses a placeholder by default, but you can
    # add a file (named either "bg room.png" or "bg room.jpg") to the
    # images directory to show it.

    scene bg room

    # This shows a character sprite. A placeholder is used, but you can
    # replace it by adding a file named "eileen happy.png" to the images
    # directory.

    show eileen happy
    # These display lines of dialogue.
    e "You've created a new Ren'Py game."
    e "Once you add a story, pictures, and music, you can release it to the world!"

label name:
    $ povname = renpy.input("What is your name?")
    $ povname = povname.strip()
    if povname == "":
     $ povname = "Jane"
    else:
       povname "My name is [povname]!"
    e " Hello, [povname]! "
    jump test

 # This ends the game.
    return
   
label test:
    e "Last..."
    show screen character_sheet
    e "... have a character sheet!"
    e "..."
    scene bg room
    show eileen happy
    e "It looks nice, right?"

#screen email_display(email):
#    style_prefix "email_display"
#    frame:
#        area (10, 100, 200, 500) #xpos, ypos, width, height
#        viewport:
#            scrollbars "vertical"
#            mousewheel True
#            draggable True
#            vbox:
#                text '[email]'

screen character_sheet():
    add "sheet_of_old paper.png" xalign 0.0 yalign 0.0
    add "nelly_small.png" xalign 0.75 yalign 0.5
    hbox: 
        xalign 0.10
        yalign 0.10
        vbox:
            xalign 0.10
            yalign 0.10
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Name.{/color}{/font}"
            null height 20
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Age:??{/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Birthday: ??{/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Alignment: - {/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Personality:{/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Likes: ... {/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Dislikes: ...{/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Skills: ...{/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Quirks: ... {/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Dreams: ... {/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Fears: ... {/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Familiy: ... {/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Secrets: ... {/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}Background:{/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}aaaa.{/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}bbbb.{/color}{/font}"
            text "{font=CheGuevaraFancy-Regular.ttf}{color=#000033}ccc.{/color}{/font}"
Last edited by marionline on Sat Nov 07, 2020 5:56 pm, edited 1 time in total.

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: how to not show text box, but show screen

#2 Post by rayminator »

use call screen instead of show screen and add zorder 100 and modal False like this

Code: Select all

screen character_sheet():
    modal False
    zorder 100
    add "sheet_of_old paper.png" xalign 0.0 yalign 0.0
    add "nelly_small.png" xalign 0.75 yalign 0.5

    hbox:

marionline
Newbie
Posts: 12
Joined: Sat Nov 07, 2020 3:41 pm
Contact:

Re: how to not show text box, but show screen

#3 Post by marionline »

Hey, thanks a lot. That worked great, the eileen text box is not showing anymore. :)

Just, how do I turn off the screen and get back to the game with textboxes showing after displaying it?

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: how to not show text box, but show screen

#4 Post by rayminator »

all you have to do is make a textbutton or imagebutton

like this:

Code: Select all

textbutton _("Back") action [Hide("your_screen_name"), Return()]

or 

imagebutton idle "images/your_image.png" hover "images/your_image.png" action [Hide("your_screen_name"), Return()]

marionline
Newbie
Posts: 12
Joined: Sat Nov 07, 2020 3:41 pm
Contact:

Re: how to not show text box, but show screen

#5 Post by marionline »

Yeahy! It's working! =D
Thanks a lot again!

Post Reply

Who is online

Users browsing this forum: No registered users