renpy.input boxed in center of the screen?
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.
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.
- Kokoro Hane
- Eileen-Class Veteran
- Posts: 1236
- Joined: Thu Oct 27, 2011 6:51 pm
- Completed: 30 Kilowatt Hours Left, The Only One Girl { First Quarter }, An Encounter ~In The Rain~, A Piece of Sweetness, Since When Did I Have a Combat Butler?!, Piece by Piece, +many more
- Projects: Fateful Encounter, Operation: Magic Hero
- Organization: Tofu Sheets Visual
- Deviantart: kokoro-hane
- itch: tofu-sheets-visual
- Contact:
renpy.input boxed in center of the screen?
When using renpy.input so the user can enter in their own name for the MC, is there a way to have that appear as its own textbox in the center of the screen with words above it (example; "What is your name?") instead of in the dialogue textbox? (As well as hide the dialogue textbox during this part)
PROJECTS:
Operation: Magic Hero [WiP]
Piece By Piece [COMPLETE][Spooktober VN '20]
RE/COUNT RE:VERSE [COMPLETE][RPG]
Since When Did I Have a Combat Butler?! [COMPLETE][NaNoRenO2020+]
Crystal Captor: Memory Chronicle Finale [COMPLETE][RPG][#1 in So Bad It's Good jam '17]
But dear God, You're the only North Star I would follow this far
Owl City "Galaxies"
Operation: Magic Hero [WiP]
Piece By Piece [COMPLETE][Spooktober VN '20]
RE/COUNT RE:VERSE [COMPLETE][RPG]
Since When Did I Have a Combat Butler?! [COMPLETE][NaNoRenO2020+]
Crystal Captor: Memory Chronicle Finale [COMPLETE][RPG][#1 in So Bad It's Good jam '17]
But dear God, You're the only North Star I would follow this far
Owl City "Galaxies"
-
- Regular
- Posts: 79
- Joined: Sun May 15, 2011 11:50 pm
- Projects: From Innocence
- Location: The Evergreen State
- Contact:
Re: renpy.input boxed in center of the screen?
Sure. If I understand you correctly, why not just create a screen (a background) that features the words you want? Use your background image for the current scene and your favorite photo editor, and then save it to your game folder and define it...
and then...
Or anything like that.
That's the simplest way. You could also create an imagemap or imagebutton at the center of the screen that, when clicked, gives the user a chance to type in their character's name. http://lemmasoft.renai.us/forums/viewto ... f=8&t=9812
Code: Select all
image name = "what's your name.png"
Code: Select all
scene name with dissolve
That's the simplest way. You could also create an imagemap or imagebutton at the center of the screen that, when clicked, gives the user a chance to type in their character's name. http://lemmasoft.renai.us/forums/viewto ... f=8&t=9812
-
- Regular
- Posts: 79
- Joined: Sun May 15, 2011 11:50 pm
- Projects: From Innocence
- Location: The Evergreen State
- Contact:
Re: renpy.input boxed in center of the screen?
Although, I may have misunderstood you. Did you mean you wanted them to be able to type in their name at the center? Sorry, I think I interpreted it as you just wanted the question "what's your name" to appear in the center. Oops.
Re: renpy.input boxed in center of the screen?
Why, sure. Just edit the input screen as you'd do normally and don't forget to change the style.
The following code:
produces the result you can see in an attached image.
The following code:
Code: Select all
screen input:
window:
style "nvl_window"
text prompt xalign 0.5 yalign 0.4
input id "input" xalign 0.5 yalign 0.5
use quick_menu
If your question is solved, please add [Solved] to theme's name by editing its first post, so that the helpful guys out there wouldn't mistakenly think the problem is still unanswered and waste their time.
- xavimat
- Eileen-Class Veteran
- Posts: 1460
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love, unknown
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
- Contact:
Re: renpy.input boxed in center of the screen?
I was looking for this, also. Thanks, Levrex.
Is there a way to show the question without deleting the former text? I mean, that's the usual behavior of the nvl mode, if you don't "nvl clear" it, it doesn't disappear. But with this modified input screen, the former text disappears.
Is there a way to show the question without deleting the former text? I mean, that's the usual behavior of the nvl mode, if you don't "nvl clear" it, it doesn't disappear. But with this modified input screen, the former text disappears.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
- Kokoro Hane
- Eileen-Class Veteran
- Posts: 1236
- Joined: Thu Oct 27, 2011 6:51 pm
- Completed: 30 Kilowatt Hours Left, The Only One Girl { First Quarter }, An Encounter ~In The Rain~, A Piece of Sweetness, Since When Did I Have a Combat Butler?!, Piece by Piece, +many more
- Projects: Fateful Encounter, Operation: Magic Hero
- Organization: Tofu Sheets Visual
- Deviantart: kokoro-hane
- itch: tofu-sheets-visual
- Contact:
Re: renpy.input boxed in center of the screen?
Thank you so much! I'll definitely be trying that!
PROJECTS:
Operation: Magic Hero [WiP]
Piece By Piece [COMPLETE][Spooktober VN '20]
RE/COUNT RE:VERSE [COMPLETE][RPG]
Since When Did I Have a Combat Butler?! [COMPLETE][NaNoRenO2020+]
Crystal Captor: Memory Chronicle Finale [COMPLETE][RPG][#1 in So Bad It's Good jam '17]
But dear God, You're the only North Star I would follow this far
Owl City "Galaxies"
Operation: Magic Hero [WiP]
Piece By Piece [COMPLETE][Spooktober VN '20]
RE/COUNT RE:VERSE [COMPLETE][RPG]
Since When Did I Have a Combat Butler?! [COMPLETE][NaNoRenO2020+]
Crystal Captor: Memory Chronicle Finale [COMPLETE][RPG][#1 in So Bad It's Good jam '17]
But dear God, You're the only North Star I would follow this far
Owl City "Galaxies"
Re: renpy.input boxed in center of the screen?
http://www.renpy.org/wiki/renpy/doc/ref ... s/ui.inputxavimat wrote:Is there a way to show the question without deleting the former text?
Either that or:
1) Add modal True and zorder 1 lines to the input screen.
2) Call the screen with $ x = renpy.call_screen("input", prompt="Whatcha gonna do?") instead of $ x = renpy.input("Whatcha gonna do?").
If your question is solved, please add [Solved] to theme's name by editing its first post, so that the helpful guys out there wouldn't mistakenly think the problem is still unanswered and waste their time.
- xavimat
- Eileen-Class Veteran
- Posts: 1460
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love, unknown
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
- Contact:
Re: renpy.input boxed in center of the screen?
Thanks, Levrex. I've used your modificatins and it's working. I can't use, though, the "deafult" parameter of the input. It's that possible?Levrex wrote:1) Add modal True and zorder 1 lines to the input screen.xavimat wrote:Is there a way to show the question without deleting the former text?
2) Call the screen with $ x = renpy.call_screen("input", prompt="Whatcha gonna do?") instead of $ x = renpy.input("Whatcha gonna do?").
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Re: renpy.input boxed in center of the screen?
Doesn't seem like so, because those functions understand "default" parameter differently.
You can, however, check if the returned string is an empty one and, if that's the case, i.e. if the user does not input anything, assign it a "standard" value. The user won't see it when the screen appears, though, but you can still write in the prompt string that «if you leave the string empty, you will be referred to as John Doe».
You can, however, check if the returned string is an empty one and, if that's the case, i.e. if the user does not input anything, assign it a "standard" value. The user won't see it when the screen appears, though, but you can still write in the prompt string that «if you leave the string empty, you will be referred to as John Doe».
If your question is solved, please add [Solved] to theme's name by editing its first post, so that the helpful guys out there wouldn't mistakenly think the problem is still unanswered and waste their time.
-
- Miko-Class Veteran
- Posts: 758
- Joined: Tue Jun 22, 2010 12:54 am
- Completed: Christmas
- IRC Nick: DragoonHP
- Location: Zion Island, Solario
- Contact:
Re: renpy.input boxed in center of the screen?
xavimat: Modify your imput screen
Then call your screen like this: $ x = renpy.call_screen("input", prompt="Whatcha gonna do?", someText = "Something")
Code: Select all
screen input(prompt, someText = ""):
window style "input_window":
has vbox
text prompt style "input_prompt"
input id "input" style "input_text" default someText
- xavimat
- Eileen-Class Veteran
- Posts: 1460
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love, unknown
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
- Contact:
Re: renpy.input boxed in center of the screen?
Thanks, DragoonHP. It's working!DragoonHP wrote:xavimat: Modify your imput screen
Then call your screen like this: $ x = renpy.call_screen("input", prompt="Whatcha gonna do?", someText = "Something")Code: Select all
screen input(prompt, someText = ""): window style "input_window": has vbox text prompt style "input_prompt" input id "input" style "input_text" default someText
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
- MilywayObree
- Newbie
- Posts: 17
- Joined: Sun Jan 28, 2018 11:24 am
- Completed: None so far, pending to be exact
- Projects: DDLC, The notebook and other secret projects
- Organization: Vocastin/Oriaa Pro-Creations
- Deviantart: MexicoRPelino
- Github: HizashiroTakahashi
- Skype: PixelMINEGaming
- Location: Philippines
- Contact:
Re: renpy.input boxed in center of the screen?
Umm... if you would want it to be in a frame, you would want to do this...
This example is what i used for a mod, the game is a game I made that I call "Roll":
now you would want to define the variable..
and now this....
and so on.....
This example is what i used for a mod, the game is a game I made that I call "Roll":
Code: Select all
screen guess_input(roll_action, roll_act):
modal True
zorder 200
style_prefix "confirm"
add "gui/overlay/confirm.png"
key "K_RETURN" action [Play("sound", gui.activate_sound)]
frame:
vbox:
xalign .5
yalign .5
spacing 30
label _("What will be your guess?"):
style "confirm_prompt"
xalign 0.5
input default "None" value VariableInputValue("guess2") length 1 allow "012345"
hbox:
xalign 0.5
spacing 100
textbutton _("Guess!") action [ roll_action, roll_act, Hide("guess_input"), Show("guessed") ]
Code: Select all
default persistent.guess = ""
default guess2 = persistent.guess
default roll2 = None
init python:
def FinishGuess():
persistent.guess = guess2
Code: Select all
call screen guess_input(roll_action=Function(FinishGuess), roll_act=SetVariable("roll2", (random.randint(1,5))))
e "you guessed the number [guess2], let's see if it is correct!"
menu:
"Roll":
show text("You rolled the number [roll2]")
if roll2 == 1:
if guess2 == 1:
e "you guessed the correct number!"
call win
else:
e "sorry, you guessed the wrong number!"
call tryagain
Just Monika.
-
- Newbie
- Posts: 13
- Joined: Thu Oct 15, 2020 9:59 am
- Soundcloud: DivinePlane
- Contact:
Re: renpy.input boxed in center of the screen?
I have tried this because I wanted to make an nvl visual novel, but I can't seem to put the input thing on top of the nvl thing. Maybe if I delete image of the nvl background?
I don't want to do that though, so help on this would be welcome.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]