Customizing renpy.input [resolved]

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
Cafechan
Regular
Posts: 107
Joined: Fri Aug 13, 2010 5:09 am
Completed: algormortis
Projects: The Duenkhy, Lights on Stillwater Hill
Contact:

Customizing renpy.input [resolved]

#1 Post by Cafechan » Fri May 30, 2014 11:03 pm

Probably a silly question, but I've been searching high and low, and I have a feeling the solution is just simple + I'm too dumb to figure it out on my own.

By default, renpy.input text is yellow. How can I change that color?
Screen shot 2014-05-30 at 8.02.16 PM.png
Whoops, here's my code, too. It's after the start label in the script.rpy.

Code: Select all

    $ jun = renpy.input("Please type your name and hit enter, or just hit enter to go with the default name.", length=10) or "Jun"
    play sound "sfxsuccess.mp3"
    "Thank you, [jun]! Have fun."

I have a feeling it goes into the input code on the screens.rpy page but....

Code: Select all

screen input:

    window style "input_window":
        has vbox

        text prompt style "input_prompt"
        input id "input" style "input_text"
I'm not quite sure where or how to write it (sweats)
Last edited by Cafechan on Fri May 30, 2014 11:33 pm, edited 1 time in total.

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Customizing renpy.input

#2 Post by Asceai » Fri May 30, 2014 11:15 pm

Code: Select all

style input:
    color "#f0f"
To disable the quick menu, just remove/comment out 'use quick_menu' in screen input in screens.rpy.
EDIT: Did I imagine the question about disabling the quick menu? *confused*

User avatar
Cafechan
Regular
Posts: 107
Joined: Fri Aug 13, 2010 5:09 am
Completed: algormortis
Projects: The Duenkhy, Lights on Stillwater Hill
Contact:

Re: Customizing renpy.input

#3 Post by Cafechan » Fri May 30, 2014 11:18 pm

Eeek, I got this error.

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/screens.rpy", line 112: Expected a screen language statement.
    style input:
         ^

Ren'Py Version: Ren'Py 6.15.7.374
Did I put it in wrong?

Code: Select all

screen input:
    
    window style "input_window":
        has vbox

        text prompt style "input_prompt"
        input id "input" style "input_text"
    style input:
        color "#f0f"
Also I figured out how to remove the quick menu just now. Hehe! I deleted it right as you posted your reply. Sorry for the confusion!
Last edited by Cafechan on Fri May 30, 2014 11:20 pm, edited 1 time in total.

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Customizing renpy.input

#4 Post by Asceai » Fri May 30, 2014 11:20 pm

Yes you did. It's just a style- put it anywhere, but not in a block of other code.

Code: Select all

style input:
    color "#f0f"
screen input:   
    window style "input_window":
        has vbox

        text prompt style "input_prompt"
        input id "input" style "input_text"
Read up on the style statement here

User avatar
Cafechan
Regular
Posts: 107
Joined: Fri Aug 13, 2010 5:09 am
Completed: algormortis
Projects: The Duenkhy, Lights on Stillwater Hill
Contact:

Re: Customizing renpy.input

#5 Post by Cafechan » Fri May 30, 2014 11:21 pm

Oops! Thank you! But now I'm getting this... = ( !!!

Code: Select all

File "game/screens.rpy", line 105: expected statement.
    style input:
               ^

User avatar
Cafechan
Regular
Posts: 107
Joined: Fri Aug 13, 2010 5:09 am
Completed: algormortis
Projects: The Duenkhy, Lights on Stillwater Hill
Contact:

Re: Customizing renpy.input

#6 Post by Cafechan » Fri May 30, 2014 11:33 pm

I figured it out!! It was so obvious, too.

Code: Select all

screen input:   
    window style "input_window":
        has vbox

        text prompt style "input_prompt"
        input id "input" style "input_text" color "#BFDC94"
Thank you for your help!!!

Post Reply

Who is online

Users browsing this forum: No registered users