Custom Text box frame

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
Aang
Regular
Posts: 36
Joined: Sat Sep 05, 2009 1:57 pm
Projects: Gen'sou shrine
Location: Quebec whoohoo!
Contact:

Custom Text box frame

#1 Post by Aang »

I did a custom text box fram in photoshop and i've putted the new file in the options but when we test the game to see what it looks like, the text box is tinier than when we saved it and the text doesn't want to go directly in it. The text is written at the default place. Am I missing something? What should I do?
Image

User avatar
mugenjohncel
Hentai Poofter
Posts: 2121
Joined: Sat Feb 04, 2006 11:13 pm
Organization: Studio Mugenjohncel
Location: Philippines
Contact:

Re: Custom Text box frame

#2 Post by mugenjohncel »

Aang wrote:I did a custom text box fram in photoshop and i've putted the new file in the options but when we test the game to see what it looks like, the text box is tinier than when we saved it
You may have to uncomment the one in the options.rpy and change this line a bit...

Code: Select all

    style.window.yminimum = ???
Aang wrote:The text is written at the default place. Am I missing something?
For this... you may want to fiddle with these in the options.rpy

Code: Select all

    style.window.left_padding = ??
    style.window.right_padding = ??
    style.window.top_padding = ??
    style.window.bottom_padding = ??
"POOF" (DIsappears)

Aang
Regular
Posts: 36
Joined: Sat Sep 05, 2009 1:57 pm
Projects: Gen'sou shrine
Location: Quebec whoohoo!
Contact:

Re: Custom Text box frame

#3 Post by Aang »

I'm able to play with the size, but the text still ain't going in the text box completly. I don't understand.
Image

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Custom Text box frame

#4 Post by JQuartz »

Aang wrote:but the text still ain't going in the text box completly.
mugenjohncel wrote:For this... you may want to fiddle with these in the options.rpy

Code: Select all

    style.window.left_padding = 20
    style.window.right_padding = 20
    style.window.top_padding = 20
    style.window.bottom_padding = 20
Remember to remove the # from the code in front of these lines(the ones in your options.rpy; the ones here have already been removed).
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Aang
Regular
Posts: 36
Joined: Sat Sep 05, 2009 1:57 pm
Projects: Gen'sou shrine
Location: Quebec whoohoo!
Contact:

Re: Custom Text box frame

#5 Post by Aang »

I already know that. The thing is, when I have the right size for the text box frame, well the text doesn,t go in and when the text goes in the text box well the box fram is way too big.
Image

Alex

Re: Custom Text box frame

#6 Post by Alex »

Hm, what is the size of your frame in pixels?
And, is there any transparent space round your frame?

Aang
Regular
Posts: 36
Joined: Sat Sep 05, 2009 1:57 pm
Projects: Gen'sou shrine
Location: Quebec whoohoo!
Contact:

Re: Custom Text box frame

#7 Post by Aang »

I played a lot with the size, but currently it's 283 pixels high and 1020 pixels wide. And yes there's some transparent space around it, well it's suppose to be.
Image

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Custom Text box frame

#8 Post by JQuartz »

Aang wrote:The thing is, when I have the right size for the text box frame, well the text doesn,t go in and when the text goes in the text box well the box fram is way too big.
The code(padding) doesn't affect the text box frame size. It only affects the default position of the text. Take note that it's padding not the one(margin) before it. Margin affects the text box size.

Code: Select all

    
    style.window.left_padding = 60 #increase this value if the text is too left and vice-versa
    style.window.right_padding = 60 #increase this value if too right
    style.window.top_padding = 60 #increase this value if too high
    style.window.bottom_padding = 60#increase this value if too low
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Aang
Regular
Posts: 36
Joined: Sat Sep 05, 2009 1:57 pm
Projects: Gen'sou shrine
Location: Quebec whoohoo!
Contact:

Re: Custom Text box frame

#9 Post by Aang »

Ah thanks a lot, i think you've just solved our problem, finally!
Image

Post Reply

Who is online

Users browsing this forum: Baidu [Spider]