[PC][Newbie] Can't get a screen working, input problems, image not aligning

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
Posts: 1
Joined: Wed May 05, 2021 10:33 am

[PC][Newbie] Can't get a screen working, input problems, image not aligning

#1 Post by memoryhunter » Wed May 05, 2021 10:58 am

Hello. First time asking a question here and I am extremely noob in RenPy, so my bad If I convey the problem not that clearly
I would like to implement a feedback screen, where the user writes whatever they want, in a textbox.
I couldn't get the image(which is a textbox like image) to align exactly in the center(I did use truecenter but It aligns the pictures 0,0 coordinates in the center, and what I want is that the middle of the image to be in the middle of the window of the app).
It's like this for now.

Here is the code:

Code: Select all

screen input_text():
        text "Enter your text:" outlines [ (absolute(3), "#000", absolute(0), absolute(0)) ]
            background "gui/textbox.png"
            input default "" color "000000"
Also, this image serves a purpose, to be a textbox
but when I carry on writing without pressing enter, it overlaps the image.
But, when I put a space, it stops at a certain place and then breaks the line.

I would like all of this to be centered(in the center/middle), and I have no idea of how to fix the line breaking and how big the actual "input box" is.

Again, extremely sorry for not explaining it very well, if that's the case.

User avatar
Posts: 64
Joined: Sun Dec 20, 2015 6:18 pm
Github: mavyxdawn
itch: zeillearnings
Discord: Zeil#4950

Re: [PC][Newbie] Can't get a screen working, input problems, image not aligning

#2 Post by mavyxdawn » Thu May 06, 2021 10:49 am

Hi! You can try this out. I also left a comment to explain what I did.


Code: Select all

screen input_text():
        # align center horizontally
        xalign 0.5
        text "Enter your text:"
            yoffset 20
            background "bg gray.png"
            #Setting the frame's xsize. This is the width of my image "bg gray.png"
            xsize 1344

            # The length is the max characters
            # I changed the input size to the screen size. IDK why this works but it does lol
            input default "" color "#fff"  length 1000 xsize 1920 ysize 1080
I also don't know what I'm doing XD
YouTube: Zeil Learnings
itch.io: Zeil Learnings


Post Reply

Who is online

Users browsing this forum: Bing [Bot], felsenstern