pop-up text boxes in Renpy
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.
- kuroi
- Regular
- Posts: 129
- Joined: Fri Jun 29, 2007 10:50 am
- Location: Albuquerque, New Mexico, USA
- Contact:
pop-up text boxes in Renpy
Hello everyone!
It seems that I've run into a bit of a quandary in the programming of my game. There are certain elements of the game where I would like to have a text box pop up if the user holds the mouse over a button for a certain amount of time. Unfortunately, I am having trouble figuring out if there is already a way in the Renpy engine to make a pop-up text box appear. Does anyone know if this can be easily done or will I have to code something from scratch?
It seems that I've run into a bit of a quandary in the programming of my game. There are certain elements of the game where I would like to have a text box pop up if the user holds the mouse over a button for a certain amount of time. Unfortunately, I am having trouble figuring out if there is already a way in the Renpy engine to make a pop-up text box appear. Does anyone know if this can be easily done or will I have to code something from scratch?
President, Planner, and Programmer for Kuroi Games!
Re: pop-up text boxes in Renpy
I'm pretty sure you'll have to code it from scratch using the UI functions... but... even then I don't know if it's possible.
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: pop-up text boxes in Renpy
Time-delay stuff really isn't supported in Ren'Py yet. This is something I'll probably try to address in the next release, since I want to use it for dictionary-mode.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
- kuroi
- Regular
- Posts: 129
- Joined: Fri Jun 29, 2007 10:50 am
- Location: Albuquerque, New Mexico, USA
- Contact:
Re: pop-up text boxes in Renpy
Thanks PyTom! I'll work on coding it too. If I get it done before you, I'll send it off to you and you can see if you want to just include my code.
President, Planner, and Programmer for Kuroi Games!
Re: pop-up text boxes in Renpy
Hello!
I wondered if anyone has found a solution or workaround to this problem. I'm making a game based on an older story (early 1900s) and would like to have definitions for less common words pop up if players roll over the words in question.
I wondered if anyone has found a solution or workaround to this problem. I'm making a game based on an older story (early 1900s) and would like to have definitions for less common words pop up if players roll over the words in question.
- SundownKid
- Lemma-Class Veteran
- Posts: 2299
- Joined: Mon Feb 06, 2012 9:50 pm
- Completed: Icebound, Selenon Rising Ep. 1-2
- Projects: Selenon Rising Ep. 3-4
- Organization: Fastermind Games
- Deviantart: sundownkid
- Location: NYC
- Contact:
Re: pop-up text boxes in Renpy
I guess maybe you could show a hidden screen with a timer "on hover" and have that screen show the next one once the timer reaches 0.
Re: pop-up text boxes in Renpy
Nowadays Ren'Py has Tooltip capability, here: http://www.renpy.org/doc/html/screen_ac ... l#tooltips which you could probably use.Glikka wrote:Hello!
I wondered if anyone has found a solution or workaround to this problem. I'm making a game based on an older story (early 1900s) and would like to have definitions for less common words pop up if players roll over the words in question.
- Donmai
- Eileen-Class Veteran
- Posts: 1919
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: pop-up text boxes in Renpy
Glikka, you can also use hyperlinks to create footnotes explaining the meaning of those less common words. I've created a KN based on an ancient japanese folk tale: http://lemmasoft.renai.us/forums/viewto ... 95#p273895
You just have to define a hyperlink when a word needs to have its meaning better explained:
In this case, the name of the girl, Higo, will be turned into a hyperlink that points to a label called 'define_Higo'.
Hope you can find it useful.
Edit: Oops! Forgot to tell you that 'Definition' is a character defined previously on the init block. For this game I've declared two characters for the footnotes:
You just have to define a hyperlink when a word needs to have its meaning better explained:
Code: Select all
lady "I have none,' she said. 'I can only promise to be a good and faithful wife, and tell you that I love you with all my heart and soul. Call me, then, {a=define_Higo}'Higo'{/a}, and I will be your wife."Code: Select all
label define_Higo:
Definition "{b}Higo{/b}:\nMeaning goithe or willow."
returnEdit: Oops! Forgot to tell you that 'Definition' is a character defined previously on the init block. For this game I've declared two characters for the footnotes:
Code: Select all
define Definition = Character('Definition', color="#f00")
define Translation = Character('Translation', color="#f00")No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
Re: pop-up text boxes in Renpy
This works like a charm, thank you! Do you know how I might change the hyperlink into a different color (maybe even get it to not be underlined)? It's a bit jarring on the text box background I currently have, but the functionality is exactly what I'm looking for.
- Donmai
- Eileen-Class Veteran
- Posts: 1919
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: pop-up text boxes in Renpy
I have to say this is something I've never tried, but you can try changing the hyperlink styles to make it match your text box: http://lemmasoft.renai.us/forums/viewto ... =8&t=24776
It seems you can change the color and remove the underline. Good luck!
It seems you can change the color and remove the underline. Good luck!
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
Who is online
Users browsing this forum: Bing [Bot]


