Can't change the position of the input box (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
User avatar
Mehmed
Newbie
Posts: 23
Joined: Sat Jul 20, 2013 3:57 pm
Contact:

Can't change the position of the input box (Solved)

#1 Post by Mehmed »

I'm trying to change the temporary position of the input area to fit the location on screen but it either won't budge from it's default spot or it will return errors.
I know I'm doing this wrong, so would someone kindly return an example of how to do this correctly?

Code: Select all

$ charname = renpy.input("My name is...", length=24, xpos=374, ypos=560)
When I use this I get a TypeError on xpos, so I'm assuming xpos and ypos are incorrect in the way they're being used.
I know how to change it in screens but I need it to be in a temporary location for this screen instead of the default area I have it in.
Last edited by Mehmed on Wed Jul 24, 2013 1:52 pm, edited 1 time in total.

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: Can't change the position of the input box

#2 Post by OokamiKasumi »

The key to adjusting the Input box is in your screens.rpy -- your screens Tab
-- This is how I adjusted my Input Box for my game, Faery Tale

Code: Select all

##############################################################################
# Input
#
# Screen that's used to display renpy.input()
# http://www.renpy.org/doc/html/screen_special.html#input

screen input:

    window:
        xalign 0.5 #Centered Across
        yalign 0.75 # 75% Down from Top
        has vbox
 
        text prompt:
            yoffset 5
            style "say_dialogue"
            xoffset 10
       
        input:
            id "input"
            style "input"
            color "#663300" # Color of Input Text
            yoffset 5
            xoffset 30
            
init -2 python:
    style.input_window.left_margin = 30
    style.input_window.right_margin = 30
    style.input_window.left_padding = 10
    style.input_window.right_padding = 10
    style.input_window.top_padding = 10
    
    style.input_text.size = 20
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

User avatar
Mehmed
Newbie
Posts: 23
Joined: Sat Jul 20, 2013 3:57 pm
Contact:

Re: Can't change the position of the input box

#3 Post by Mehmed »

OokamiKasumi wrote:The key to adjusting the Input box is in your screens.rpy -- your screens Tab
Thank you.

Ah, is there any way I can have text center itself while being input? You know like text moving back from the cursor without the cursor moving while typing.

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: Can't change the position of the input box

#4 Post by OokamiKasumi »

Mehmed wrote:Ah, is there any way I can have text center itself while being input? You know like text moving back from the cursor without the cursor moving while typing.
I'm afraid I don't know that one.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

User avatar
saguaro
Miko-Class Veteran
Posts: 560
Joined: Sun Feb 12, 2012 9:17 am
Completed: Locked-In, Sunrise, The Censor
Organization: Lucky Special Games
itch: saguarofoo
Location: USA
Contact:

Re: Can't change the position of the input box

#5 Post by saguaro »


User avatar
Mehmed
Newbie
Posts: 23
Joined: Sat Jul 20, 2013 3:57 pm
Contact:

Re: Can't change the position of the input box

#6 Post by Mehmed »


Oh wow, thanks.

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]