pop-up text boxes in Renpy

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
kuroi
Regular
Posts: 129
Joined: Fri Jun 29, 2007 10:50 am
Location: Albuquerque, New Mexico, USA
Contact:

pop-up text boxes in Renpy

#1 Post by kuroi » Tue Sep 11, 2007 7:59 am

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?
President, Planner, and Programmer for Kuroi Games!

User avatar
monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: pop-up text boxes in Renpy

#2 Post by monele » Tue Sep 11, 2007 10:14 am

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.

User avatar
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

#3 Post by PyTom » Tue Sep 11, 2007 11:14 am

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
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
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

#4 Post by kuroi » Wed Sep 12, 2007 8:04 am

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!

Glikka
Newbie
Posts: 3
Joined: Tue Jan 21, 2014 9:35 pm
Contact:

Re: pop-up text boxes in Renpy

#5 Post by Glikka » Tue Jan 21, 2014 9:44 pm

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.

User avatar
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

#6 Post by SundownKid » Tue Jan 21, 2014 10:24 pm

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.

User avatar
Showsni
Miko-Class Veteran
Posts: 563
Joined: Tue Jul 24, 2007 12:58 pm
Contact:

Re: pop-up text boxes in Renpy

#7 Post by Showsni » Wed Jan 22, 2014 8:13 am

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.
Nowadays Ren'Py has Tooltip capability, here: http://www.renpy.org/doc/html/screen_ac ... l#tooltips which you could probably use.

User avatar
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

#8 Post by Donmai » Wed Jan 22, 2014 8:25 am

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:

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."
In this case, the name of the girl, Higo, will be turned into a hyperlink that points to a label called 'define_Higo'.

Code: Select all

label define_Higo:
    Definition "{b}Higo{/b}:\nMeaning goithe or willow."
    return
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:

Code: Select all

    define Definition = Character('Definition', color="#f00")
    define Translation = Character('Translation', color="#f00")
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Glikka
Newbie
Posts: 3
Joined: Tue Jan 21, 2014 9:35 pm
Contact:

Re: pop-up text boxes in Renpy

#9 Post by Glikka » Wed Jan 22, 2014 1:40 pm

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.

User avatar
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

#10 Post by Donmai » Wed Jan 22, 2014 2:50 pm

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!
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: Bing [Bot]