[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.
Message
Author
User avatar
Shioriemei
Regular
Posts: 42
Joined: Thu Sep 08, 2011 11:22 pm
Completed: Pink Carnations (GXB Otome)
Contact:

Re: [Tutorial] Customizing the Textbox

#31 Post by Shioriemei » Tue Sep 13, 2011 3:20 pm

Aleema wrote:Instead, include the spaces around the edge (up to the top of the box) so that you don't have to alter margins within Ren'Py. This means that your resulting image should be as wide as your game (default: 800px).
I understand that the image has to be wide as game o.o but does it have to be same height as game too?
>.< please help me asap. D:

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Tutorial] Customizing the Textbox

#32 Post by Aleema » Tue Sep 13, 2011 3:49 pm

Nope. I said "up to the top of the box," meaning the top of your dialogue box. You don't need all that empty space above it. :)

User avatar
oza
Newbie
Posts: 17
Joined: Sat Sep 17, 2011 7:27 am
Projects: 60000 Thou
Location: Empire
Contact:

Re: [Tutorial] Customizing the Textbox

#33 Post by oza » Sat Sep 17, 2011 8:25 am

Hi guys. I have a problem with positioning "click to continiue" image:

Image

I use this code:

Image

I don't know how to fix it.
And in options.rpy I used this setting:

Image

Anyone can help with this? I tried to change settings, but is only worse.

If I change this

Code: Select all

...("images/arrow.png", (9, 21)...
to this

Code: Select all

...("images/arrow.png", (20, 20)...
, as it says in guide, when I received this error:

Code: Select all

  File "game/script.rpy", line 28, in script
        m "test"
ValueError: subsurface rectangle outside surface area
Traceback attached ._.
traceback.txt
(3.31 KiB) Downloaded 215 times

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Tutorial] Customizing the Textbox

#34 Post by Aleema » Sat Sep 17, 2011 9:58 pm

That's interesting. It probably has everything to do with the size of your image. That error occurs when the size of the image + code don't match up. If you post your image, and I can check that for you.

Also: Those are some trippy colors. I like. :)

User avatar
oza
Newbie
Posts: 17
Joined: Sat Sep 17, 2011 7:27 am
Projects: 60000 Thou
Location: Empire
Contact:

Re: [Tutorial] Customizing the Textbox

#35 Post by oza » Sun Sep 18, 2011 3:50 am

Aleema wrote:That's interesting. It probably has everything to do with the size of your image. That error occurs when the size of the image + code don't match up. If you post your image, and I can check that for you.
Most likely I'm wrong use style parameters.

Text box:
text_box.png
text_box.png (5.84 KiB) Viewed 1789 times
And the arrow:
arrow.png
arrow.png (505 Bytes) Viewed 2434 times
if you mean it.
Aleema wrote: Also: Those are some trippy colors. I like. :)
Yes yes, I like it too Image

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Tutorial] Customizing the Textbox

#36 Post by Aleema » Sun Sep 18, 2011 3:59 am

Okay, you definitely have a problem in that you're using something that you're not supposed to. XD That's why it's an error. "Filmstrip" is only for animations that are in a single image. Your CTC icon is not animation. Please say this instead and see if it works:

Code: Select all

ctc=Image("images/arrow.png", xpos=755, ypos=545),

User avatar
oza
Newbie
Posts: 17
Joined: Sat Sep 17, 2011 7:27 am
Projects: 60000 Thou
Location: Empire
Contact:

Re: [Tutorial] Customizing the Textbox

#37 Post by oza » Sun Sep 18, 2011 4:23 am

Aleema wrote:Okay, you definitely have a problem in that you're using something that you're not supposed to. XD That's why it's an error. "Filmstrip" is only for animations that are in a single image. Your CTC icon is not animation. Please say this instead and see if it works:

Code: Select all

ctc=Image("images/arrow.png", xpos=755, ypos=545),
Yes, it works ._.
But I want the arrow blinked. I saw this in the demo game. How do I do it? @_@

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Tutorial] Customizing the Textbox

#38 Post by Aleema » Sun Sep 18, 2011 4:37 am

Well, you should make an animation! It's not going to just animate itself. :) There are a couple ways to do this. I suggest this way:

Code: Select all

image ctc_blink:
    xpos 755 ypos 545
    alpha 1.0
    "images/arrow.png"
    1.0
    alpha 0
    1.0
    repeat
And in you character code, replace that line once again with:

Code: Select all

ctc="ctc_blink",
The 1.0 in the image code is 1 second of time.

User avatar
oza
Newbie
Posts: 17
Joined: Sat Sep 17, 2011 7:27 am
Projects: 60000 Thou
Location: Empire
Contact:

Re: [Tutorial] Customizing the Textbox

#39 Post by oza » Sun Sep 18, 2011 4:57 am

Oh, thank you, thats what I want xD
But the arrow is immediately after the text =_=

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: [Tutorial] Customizing the Textbox

#40 Post by Aleema » Sun Sep 18, 2011 4:58 am

You still need the " ctc_position = "fixed" ". Did you remove it?

User avatar
oza
Newbie
Posts: 17
Joined: Sat Sep 17, 2011 7:27 am
Projects: 60000 Thou
Location: Empire
Contact:

Re: [Tutorial] Customizing the Textbox

#41 Post by oza » Sun Sep 18, 2011 5:06 am

Aleema wrote:You still need the " ctc_position = "fixed" ". Did you remove it?
Yes, my bad. Completely works at now. :o
I am suffered with this 4 hours in a row. Thank you again, Aleema x3

User avatar
Scarlet-Kokoro
Regular
Posts: 36
Joined: Wed Nov 02, 2011 9:56 pm
Projects: Imitation Heart(模倣心)-Otome For the Love of Cocoa-Short-Otome VN
Contact:

Re: [Tutorial] Customizing the Textbox

#42 Post by Scarlet-Kokoro » Fri Nov 04, 2011 4:43 pm

This is a great tutorial. I found it very useful. Thanks so much! :)
"The question that sometimes drives me hazy: Am I, or the others crazy?"

Projects:

Immitation Heart: Script: 40% Characters: 50% CGs: 0%
For the Love of Cocoa: In first draft stages

User avatar
ShirakiHime
Regular
Posts: 45
Joined: Sun Oct 30, 2011 2:40 pm
Projects: Mermaid Revelation (GxB otome)
Contact:

Re: [Tutorial] Customizing the Textbox

#43 Post by ShirakiHime » Fri Nov 04, 2011 6:18 pm

for the textbox, does it have to be .png or can it be .gif D: (i was wondering if I could put an animated one :o

HigurashiKira
Miko-Class Veteran
Posts: 832
Joined: Mon Nov 01, 2010 9:10 pm
Contact:

Re: [Tutorial] Customizing the Textbox

#44 Post by HigurashiKira » Fri Nov 04, 2011 6:42 pm

ShirakiHime wrote:for the textbox, does it have to be .png or can it be .gif D: (i was wondering if I could put an animated one :o
It can be .jpg as well, but RenPy dosen't support .gif (Well, it does, but not the animated ones)
I have moved to a new account. Please contact me here from now on. T/Y~

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

Re: [Tutorial] Customizing the Textbox

#45 Post by Alex » Sat Nov 05, 2011 3:01 am

i was wondering if I could put an animated one
You can make animated textbox using ATL
http://www.renpy.org/doc/html/atl.html# ... -atl-block

Post Reply

Who is online

Users browsing this forum: No registered users