Page 1 of 1

Making Textboxes That Look Like Those Phone Texting Bubbles

Posted: Wed Feb 22, 2017 9:42 pm
by Sophrigerator
Hi everyone! I know how to customize textboxes, thanks to all the great tutorials here, but I was wondering if it is possible to make textboxes have the appearance and function of texting bubbles.

Like, can it expand downwards to accommodate to the dialogue? Can a limit be set to how far the textboxes go outwards? Can players be able to scroll through text? Will the textboxes be able to act like, well, texting? (I was thinking of kind of a mystic messenger feel lol)

Thanks so much for the responses and the patience. (And I'm sorry for any vagueness that happens to pop up I will totally elaborate if need be) :)

Re: Making Textboxes That Look Like Those Phone Texting Bubb

Posted: Wed Feb 22, 2017 9:45 pm
by SuperbowserX
IDK if this will answer your question but from Google this may be what you are looking for.

viewtopic.php?f=8&t=24715

EDIT: Okay I just read some of those posts because i shared this without checking and it looks like the OP there was trying to do the opposite of what youre doing xD but still you might farm some info for there.

Also, going by what i saw in the first comments, doesn't the textbox stretch by default?

Re: Making Textboxes That Look Like Those Phone Texting Bubb

Posted: Wed Feb 22, 2017 9:57 pm
by Sophrigerator
Thanks for the link! It certainly answers some questions I have about sizing and textbox stretching.

And the textbox does stretch by default or so I believe? I'm wondering if it is possible in renpy code for textboxes to be scrolled through or, in simple terms, appear in two places at once, like replier-answerer, if that makes sense?

I really appreciate the fast reply (wow this forum is coolio)

Re: Making Textboxes That Look Like Those Phone Texting Bubb

Posted: Wed Feb 22, 2017 10:06 pm
by SuperbowserX
No problem! As someone who started using Ren'py just a month and a half ago and posted many questions, I love answering questions if I can!

Anyway, I'm not too familiar with textboxes because I haven't made any. But your description is a bit vague so lemme ask you some questions so a future replier may be better at it. So, you want to make textboxes have a scrollbar (like the one at the far right of your textbar that you move with the mousewheel)?

Or alternatively, want longer messages (that would not overfill the text box) to have a button that lets you view the second part of them, and not have this view-second-part button for shorter messages?

Re: Making Textboxes That Look Like Those Phone Texting Bubb

Posted: Wed Feb 22, 2017 10:10 pm
by Imperf3kt
I'd suggest looking into NVL mode.
There are two main styles of presentation used for visual novels. ADV-style games present dialogue and narration one line at a time, generally in a window at the bottom of the screen. NVL-style games present multiple lines on the screen at a time, in a window that takes up the entire screen.

In this tutorial, we will explain how to make an NVL-mode game using Ren'Py. This tutorial assumes that you are already familiar with the basics of Ren'Py, as explained in the Quickstart manual.

Re: Making Textboxes That Look Like Those Phone Texting Bubb

Posted: Wed Feb 22, 2017 10:10 pm
by SuperbowserX
Also, I found this, if your answer to my previous questions was yes it may help you. (If it doesn't, Google "renpy scrollbar" for more possible helpers):

viewtopic.php?f=8&t=29860

Re: Making Textboxes That Look Like Those Phone Texting Bubb

Posted: Wed Feb 22, 2017 10:25 pm
by Sophrigerator
Oh I'm so sorry about the vagueness! Thanks for being so patient

I was thinking about the scrolling on phones. Like, you can see past text messages from two weeks ago by scrolling up. And the way you can see the message bubbles from each person you are texting? (This all sounds vague I hope you understand) Is there any way that is possible using renpy?

(Also, I haven't used NVL before. But this form may just be what I need!)

You have been so helpful so far. Thank you thank you thank you!

Re: Making Textboxes That Look Like Those Phone Texting Bubb

Posted: Wed Feb 22, 2017 10:38 pm
by SuperbowserX
Well there are many ways to do that. Would it be like an actual phone, where you have to hold-click the screen and then drag the cursor up/down while scrolling? Or would you have a scrollbar?

(Using some programming language here). My general idea is that the phone would have an array of elements. Each element would have two variables; one variable called "type" and one called "text" (these are just generic names). The first element, type, would tell you if it's the sender or replier. The second one, "text", would be actual content of that text message.

And in the textbox, you basically tell it that if "type" is "replier" then align to the right. And if "type" is "asker" (or if there are only two types then you can just say "else"), then align it to the left.

And then, just format the text's string value into a textbox.

Then, you would need to incorporate something to separate each element of the text into the window, and (using the link I provided) make it show the scrollbar if it was long enough.

You would need to append the 2d element to the array.

(All of this is guessing; I know about Java arrays and from what I've studied in the code of other games Python also uses them, but IDK how this would function in Ren'py).

Re: Making Textboxes That Look Like Those Phone Texting Bubb

Posted: Wed Feb 22, 2017 10:43 pm
by Imperf3kt
Damn, not an easy to find thread.

This may be a better choice than NVL
viewtopic.php?f=51&t=40245&p=427567#p427567

Re: Making Textboxes That Look Like Those Phone Texting Bubb

Posted: Wed Feb 22, 2017 10:56 pm
by Sophrigerator
SuperbowserX, thanks for the in-depth explanation! I will definitely try the code in my test file. And Imperf3kt, that's an awesome link! (And this is a super evasive thread hehe) You guys rock.