Create a banner with text?

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
lindsay-jb
Regular
Posts: 61
Joined: Tue Aug 25, 2020 1:05 am
Contact:

Create a banner with text?

#1 Post by lindsay-jb » Thu Mar 03, 2022 2:58 am

I play a lot of VNs and most will have moments where a textbox banner will appear at the top to tell you things like achievements, point checks (such as “your relationship with so-and-so is too low so they don’t believe you”), etc. These are not a regular text box and usually stay for a few seconds, and are visible while the regular text conversations continue.

I’ve been looking all over and can’t figure out a way to do this on renpy. I could try to have the banners as a textbox, but I don’t know how I could have two text boxes shown at the same time. And then it would be hard to have the banner stay for five seconds and not disappear when the player clicks.

Showing it as an image would be obnoxious because I’d have to make images for every single achievement/point check that I have. Anyway, wondering if anyone has any ideas or solutions for this?

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Create a banner with text?

#2 Post by Ocelot » Thu Mar 03, 2022 4:33 am

Check the implementation of default notify screen in new project.

And check out what $ renpy.notify("Hello! This is default notification.") will do. DOes it looks like something close to what you want?
< < insert Rick Cook quote here > >

lindsay-jb
Regular
Posts: 61
Joined: Tue Aug 25, 2020 1:05 am
Contact:

Re: Create a banner with text?

#3 Post by lindsay-jb » Thu Mar 03, 2022 12:00 pm

Yes, this is exactly what I was looking for! Wow! Okay, since I have you here I’m having one small issue. How do I make the text not be smashed off to one side 😅 the border is wide enough that it shouldn’t do that, so I’m confused about why that’s happening.
Attachments
B9038A7A-AE63-48A7-AFFD-C2C0091921AD.jpeg

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Create a banner with text?

#4 Post by Ocelot » Thu Mar 03, 2022 5:44 pm

There can be a lot of possible causes. One thing to check if anything from text to frame to window has something with set width or maximum size in styles. You can try to press Shift+I, while hovering over notification text and check all applied styles.
< < insert Rick Cook quote here > >

lindsay-jb
Regular
Posts: 61
Joined: Tue Aug 25, 2020 1:05 am
Contact:

Re: Create a banner with text?

#5 Post by lindsay-jb » Wed Mar 09, 2022 12:46 pm

Thank you! And sorry for the late reply. I ended up using the format of the default notify screens and made my own custom screen and function which allowed me to have more control of the properties, such as having a notification header with a different font and color than the rest of the box, and I'm very happy with the result!

Post Reply

Who is online

Users browsing this forum: enaielei, Google [Bot]