[Solved] How do you change the name input screen

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
xMichi
Regular
Posts: 35
Joined: Fri May 30, 2014 4:17 am
Contact:

[Solved] How do you change the name input screen

#1 Post by xMichi »

Hello, I've added this code to my game:

Code: Select all

label start:
    
    
    $ name = renpy.input(_("###"),length=##) or _("###")
    $ name = name.strip()

And of course it works fine, but I'd like to make a screen out of it that looks different and where you can input the text in the center.

Something like (x), (x) or (x)

My plan was using an imagemap for it, but aside from making the picture, I have no idea on how to go about it. I'm guessing I need to make a screen for it?

I'm also unsure if it's something easy to fix or if it requires a high knowledge of code.

I hope someone can help?
Last edited by xMichi on Wed Mar 29, 2017 6:30 am, edited 1 time in total.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2400
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: How do you change the name input screen

#2 Post by Ocelot »

Check input screen is screens.rpy. It is used to actually display input promt. You would need to include input id "input" displayable to make it work with renpy.input.
< < insert Rick Cook quote here > >

xMichi
Regular
Posts: 35
Joined: Fri May 30, 2014 4:17 am
Contact:

Re: How do you change the name input screen

#3 Post by xMichi »

Ocelot wrote:Check input screen is screens.rpy. It is used to actually display input promt. You would need to include input id "input" displayable to make it work with renpy.input.

Code: Select all

screen input(prompt):

    window style "input_window":
        has vbox

        text prompt style "input_prompt"
        input id "input" style "input_text" 
This part of the code is already being displayed. The screen does appear but I want to use an image map for it and was wondering how to go about doing that since I really have no idea.
Instead of the standard input screen, I want it to look different like examples above and then with using an imagemap.

I understand I need hotspots in that case but... I have no idea how to go about it.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2400
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: How do you change the name input screen

#4 Post by Ocelot »

What is the problem exactly? You have a screen. You can do anything to it, add everything you like, completely rework it. You just need to keep input part, because it wouldn't be an input screen without a way to input text, right?
< < insert Rick Cook quote here > >

xMichi
Regular
Posts: 35
Joined: Fri May 30, 2014 4:17 am
Contact:

Re: How do you change the name input screen

#5 Post by xMichi »

Ocelot wrote:What is the problem exactly? You have a screen. You can do anything to it, add everything you like, completely rework it. You just need to keep input part, because it wouldn't be an input screen without a way to input text, right?

The problem is that I don't know how to go about it. So I'm wondering if someone has a tip on how to do it or where to look to find more information. I tried looking it up, but I don't have much knowledge on it yet so I'm wondering if someone can help.
The thing is that I'd like to use an imagemap.

The specific thing I'm struggling with the most is how to make it so that I can input the text in another place (like in the middle of the screen).

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: How do you change the name input screen

#6 Post by indoneko »

how to make it so that I can input the text in another place (like in the middle of the screen)
If you want to put it at the center of the screen, just add at truecenter in your input screen's window. Or you can put it wherever you want; just search renpy's documentation about screen and the positional properties. You could also add a background image for this window. Perhaps something like this :

Code: Select all

screen input(prompt):
    window at truecenter:    # --> you can change your input screen's window's position here
        xmaximum 500
        background Solid("#123")  # --> You can change the solid color background with your own image
        vbox:
            xalign 0.5
            yalign 0.5
            text prompt style "input_prompt"
            input id "input"
My avatar is courtesy of Mellanthe

xMichi
Regular
Posts: 35
Joined: Fri May 30, 2014 4:17 am
Contact:

Re: How do you change the name input screen

#7 Post by xMichi »

indoneko wrote: If you want to put it at the center of the screen, just add at truecenter in your input screen's window. Or you can put it wherever you want; just search renpy's documentation about screen and the positional properties. You could also add a background image for this window. Perhaps something like this :

Code: Select all

screen input(prompt):
    window at truecenter:    # --> you can change your input screen's window's position here
        xmaximum 500
        background Solid("#123")  # --> You can change the solid color background with your own image
        vbox:
            xalign 0.5
            yalign 0.5
            text prompt style "input_prompt"
            input id "input"
Ohh, thank you so much! This really helped me out. I know where to look now and I think I fixed something. Thank you : )

Post Reply

Who is online

Users browsing this forum: Google [Bot], henne, simple_human, WladekProd