[Tutorial] Customizing the Textbox

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
Twisted-Eva
Regular
Posts: 138
Joined: Tue Jan 11, 2011 7:48 pm
Projects: Our Crossing Paths
Contact:

Re: [Tutorial] Customizing the Textbox

#61 Post by Twisted-Eva »

Alex wrote:Well, if you already left some free space between screen side and textbox for a side image, you don't need to set left_padding at all.
Thank you, I'll try that when I get back home. I changed the left_padding from 290 to 250 thinking there should be a difference in spacing within the textbox, but it didn't cross my mind to just set it to 0 and see what happens.
Deviantart Account
Current Project: Our Crossing Paths [GxB] [Alternate History/Drama]
Image

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: [Tutorial] Customizing the Textbox

#62 Post by AERenoir »

Is it possible to make a different textbox setting for different character? Let's say I want the main character to have a different-looking textbox and have her side image be positioned on the left, while everyone else's side image is on the right.

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: [Tutorial] Customizing the Textbox

#63 Post by Alex »

You could try this good ol' method - http://www.renpy.org/wiki/renpy/FAQ#How ... y_speak.3F

User avatar
leon
Miko-Class Veteran
Posts: 554
Joined: Sun Oct 09, 2011 11:15 pm
Completed: Visual Novel Tycoon, Night at the Hospital, Time Labyrinth, The Buried Moon, Left of Center, Super Otome Quest
Projects: Lemon Project, Porcelain Heart, Dream's Dénouement
Organization: Team ANARKY
Contact:

Re: [Tutorial] Customizing the Textbox

#64 Post by leon »

This will use a different texbox image for one character:

Code: Select all

    define mc = Character("Derp", window_background="textbox.png")
You can change other attributes in a similar fashion. For example style.window.left_padding becomes window_left_padding.

kirbysuperstar
Newbie
Posts: 10
Joined: Fri Jan 18, 2013 9:11 pm
Contact:

Re: [Tutorial] Customizing the Textbox

#65 Post by kirbysuperstar »

Is there a way to get CTC animations/images to show up on 'narration' lines? I'm probably missing something really bleeding obvious, but aside from making a "narration" character and setting all the narration say lines to use that then I'm lost.

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: [Tutorial] Customizing the Textbox

#66 Post by Alex »

When you've created a "narrator" character you don't need to use it like

Code: Select all

narrator "What?"
everything will work as usual

Code: Select all

"That's me - narrator, speaks!"
http://www.renpy.org/doc/html/dialogue. ... characters

kirbysuperstar
Newbie
Posts: 10
Joined: Fri Jan 18, 2013 9:11 pm
Contact:

Re: [Tutorial] Customizing the Textbox

#67 Post by kirbysuperstar »

Ahah. Yes, that got it. Told you I was missing something obvious. Cheers.

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: [Tutorial] Customizing the Textbox

#68 Post by AERenoir »

I'm using Renpy 6.12, and I wanted the save/load menu to be on the textbox like in 6.13. 6.13 and above keep on crashing on my computer. Where do I code the stuff in?

User avatar
Hyraculon
Regular
Posts: 51
Joined: Tue Oct 08, 2013 4:46 am
Projects: Goetia Club
Contact:

Re: [Tutorial] Customizing the Textbox

#69 Post by Hyraculon »

This thread has been amazingly helpful, but there's one thing I can't seem to figure out. I'm using show_two_window for my character names. I also managed to set a character who has a unique text box with window_background, but I can't figure out what code to put in to style that character's name box. What code should I be using for this?

Myrgjol
Newbie
Posts: 2
Joined: Sat Jun 01, 2013 5:50 pm
Contact:

Re: [Tutorial] Customizing the Textbox

#70 Post by Myrgjol »

This tutorial was so useful~! (°w°)
But leave it to me to srew things around ;A;
I wanted that, instead of different textboxes, each character had a special namebox, is it possible? (°^°)
In any case, thank you very much for the tutorial (;w;)
Attachments
Namebox for that character
Namebox for that character
isa_saybox.png (9.37 KiB) Viewed 2902 times
Texbox and namebox right now
Texbox and namebox right now

User avatar
Hyraculon
Regular
Posts: 51
Joined: Tue Oct 08, 2013 4:46 am
Projects: Goetia Club
Contact:

Re: [Tutorial] Customizing the Textbox

#71 Post by Hyraculon »

Myrgjol wrote:I wanted that, instead of different textboxes, each character had a special namebox, is it possible? (°^°)
I had a lot of trouble with this, too. You can find some good solutions here and here.

Myrgjol
Newbie
Posts: 2
Joined: Sat Jun 01, 2013 5:50 pm
Contact:

Re: [Tutorial] Customizing the Textbox

#72 Post by Myrgjol »

THANK YOU!!! :'D
The second one helped me a lot ;w;

SixOfSpades
Newbie
Posts: 10
Joined: Mon Aug 26, 2013 5:31 am
Contact:

Re: [Tutorial] Customizing the Textbox

#73 Post by SixOfSpades »

Thanks for the clear tutorial, but I do have an additional question.

While I understand that you can give a specific character their own textbox, is there a way to change textbox without tying it to a character?

Say for example I want Alice to use TextboxA when talking normally, and TextboxB when I want to represent her yelling. I suppose I can define a second character that's only called when Alice yells, but that sounds inefficient.

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: [Tutorial] Customizing the Textbox

#74 Post by Alex »

I suppose I can define a second character that's only called when Alice yells, but that sounds inefficient.
That sounds ok. You even won't need to copy/paste the whole code for second character

Code: Select all

define alice_a = Character("Alice", window_background="bg1.png", who_color="#c8ffc8", what_color="#fff", etc.)
define alice_b = Character("Alice", kind=alice_a, window_background="bg2.png")
http://www.renpy.org/doc/html/dialogue. ... er-objects

kirbysuperstar
Newbie
Posts: 10
Joined: Fri Jan 18, 2013 9:11 pm
Contact:

Re: [Tutorial] Customizing the Textbox

#75 Post by kirbysuperstar »

Quick question - if I've set a textbox colour with style.window.background, can I make that transparent at all or do I have to use a frame/PNG with transparency set?

Post Reply

Who is online

Users browsing this forum: No registered users