Page 1 of 1

How to fix this name bug?

Posted: Sat Aug 04, 2018 5:08 pm
by LiveTurkey
So I'm trying to get the player to enter a character name and I have two minor visual bugs.

Here is a picture

Image

The first bug is that the place where you type happens directly over the place where it says "Enter your name"

The second bug is that the cursor is not where the player is typing. The player is typing where the first line begins but if you look, the cursor is to the right and up of the word "name". Where the orange meets the white.

The code I have for this is pretty simple

Code: Select all

python:
        name = renpy.input("              Enter your name", allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", length=10)
        name = name.strip()

        if not name:
             name = "Anon" 
Does anyone know how to fix these two bugs?

Re: How to fix this name bug?

Posted: Sat Aug 04, 2018 5:55 pm
by Imperf3kt
I think you have some indentation errors
I suggest trying this:

Code: Select all

python:
    name = renpy.input('Enter your name', allow=' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', length=10)
    name = name.strip()

        if not name:
            name = "Anon"


Re: How to fix this name bug?

Posted: Sat Aug 04, 2018 6:04 pm
by LiveTurkey
Imperf3kt wrote:
Sat Aug 04, 2018 5:55 pm
I think you have some indentation errors
I suggest trying this:

Code: Select all

python:
    name = renpy.input('Enter your name', allow=' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', length=10)
    name = name.strip()

        if not name:
            name = "Anon"

If I get rid of the spaces, it puts "Enter your name before the red line (at the border of the text box. )

Re: How to fix this name bug?

Posted: Sun Aug 05, 2018 2:00 am
by Per K Grok
LiveTurkey wrote:
Sat Aug 04, 2018 6:04 pm

----

If I get rid of the spaces, it puts "Enter your name before the red line (at the border of the text box. )
Move the textbox so the text is positioned where you want it in relation to the background, without using empty spaces..