telegram messenger (2 version)

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
sDextra
Newbie
Posts: 1
Joined: Fri Oct 12, 2018 2:06 am
Contact:

Re: telegram messenger (2 version)

#31 Post by sDextra » Fri Oct 12, 2018 2:14 am

zeroTheHero wrote:
Thu Oct 11, 2018 8:29 am
Andredron wrote:
Wed Oct 10, 2018 1:16 am
zeroTheHero wrote:
Tue Oct 09, 2018 11:07 am
Hey, how do I make the text in messenger in italics?
Text tag

"{i} text{\i}"
I tried

Code: Select all

msg("Привет,{i} text{\i} всё хорошо, а как у тебя?")
but no dice

Code: Select all

Exception: unknown text tag u'\\i'
It'd be amazing if we could use {w} and {b} and all the other cool tags in this...

Thanks for your time ^_^
Try it
{i}Text{/i}

User avatar
Andredron
Regular
Posts: 173
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: telegram messenger (2 version)

#32 Post by Andredron » Fri Oct 12, 2018 2:35 am

zeroTheHero wrote:
Thu Oct 11, 2018 8:29 am
Andredron wrote:
Wed Oct 10, 2018 1:16 am
zeroTheHero wrote:
Tue Oct 09, 2018 11:07 am
Hey, how do I make the text in messenger in italics?
Text tag

"{i} text{\i}"
I tried

Code: Select all

msg("Привет,{i} text{\i} всё хорошо, а как у тебя?")
but no dice

Code: Select all

Exception: unknown text tag u'\\i'
It'd be amazing if we could use {w} and {b} and all the other cool tags in this...

Thanks for your time ^_^

my error

Image

Image
I know, I have terrible English
I'm writing a Renpy textbook (in Russian). I would be glad if someone translated into an English or German textbook https://yadi.sk/d/ZX_DonP63USRru Update 22.06.18

User avatar
Andredron
Regular
Posts: 173
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: telegram messenger (2 version)

#33 Post by Andredron » Fri Oct 12, 2018 2:43 am

Nanahs wrote:
Mon Oct 01, 2018 8:35 pm
Andredron wrote:
Fri Sep 14, 2018 5:17 pm
Please, whoever can check both versions how they work on android and iphone. Friend wrote: a bug and the image does not show
Hello! On the first version of the messenger, can I have different message boxes? Like, the gray one for the character that's talking to you, and yours be another color? (green, blue, etc).
How could I add this? (if possible)
Thanks :)
Image
https://pp.userapi.com/c849136/v8491365 ... GL10wk.jpg

Code: Select all

Xalign xgn xmaximum 580 xpadding 20 ypadding 10 button:
.... if anyone == 1:
........ frame background ("messenger / box_two.png", 25, 25)
....else:
. ....... background Frame ("messenger / box.png", 25, 25)
Box_two
Image
I know, I have terrible English
I'm writing a Renpy textbook (in Russian). I would be glad if someone translated into an English or German textbook https://yadi.sk/d/ZX_DonP63USRru Update 22.06.18

Nanahs
Regular
Posts: 94
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Re: telegram messenger (2 version)

#34 Post by Nanahs » Fri Oct 12, 2018 11:11 am

Andredron wrote:
Fri Oct 12, 2018 2:43 am
Nanahs wrote:
Mon Oct 01, 2018 8:35 pm
Andredron wrote:
Fri Sep 14, 2018 5:17 pm
Please, whoever can check both versions how they work on android and iphone. Friend wrote: a bug and the image does not show
Hello! On the first version of the messenger, can I have different message boxes? Like, the gray one for the character that's talking to you, and yours be another color? (green, blue, etc).
How could I add this? (if possible)
Thanks :)
Image
https://pp.userapi.com/c849136/v8491365 ... GL10wk.jpg

Code: Select all

Xalign xgn xmaximum 580 xpadding 20 ypadding 10 button:
.... if anyone == 1:
........ frame background ("messenger / box_two.png", 25, 25)
....else:
. ....... background Frame ("messenger / box.png", 25, 25)
Box_two
Image

Thank you so much! I just got confused, which part of the code I can delete and replace with this one?

Code: Select all

screen telegram():
    frame background "messenger/back.png" xysize (600,975) align (0.9,.5):
        frame background None xysize (560, 810) align (0.5,0.58):
            viewport id "vp_msg" mousewheel True  yadjustment yadj:
                vbox spacing 15 xsize 550 xalign 0.4 box_reverse True:
                    for message in m_msg[::-1]:
                        $ who, txt, sound = message
                        $ xgn = 0.0 if who else 1.0
                        if sound:
                            imagebutton auto "messenger/sound_%s.png" xalign xgn action Play("sound", sound)
                        else: 
                            button xalign xgn xmaximum 580 xpadding 20 ypadding 10 background Frame("messenger/box.png", 25, 25):
                                text "%s"%(txt) style "txt_base"
                                

        # Имя собеседника
        text "%s"%(msg_name) style "txt_base" size 35 xalign 0.31 xanchor 0.0 yalign 0.04
        # Аватарка собеседника
        add "messenger/av/"+msg_name.lower().replace(' ', '_')+".png" pos (100,27)
        # Стрелка
        imagebutton auto "messenger/arr_%s.png" pos (10, 33) action NullAction()
        # Стереть сообщения
        button background style_button_inst hover_background style_button_hovr xalign 0.99 yalign 0.03 action Function(del_all_msg) xysize (60,60):
            text "  x  " style "txt_base" size 40 pos (36, -2) 
        # Ползунок прокрутки
        vbar value YScrollValue("vp_msg") style "bar_vert"
I tried but it kept giving me errors :?:
Sorry I'm still slow, still learning :D
Thank you!

Post Reply

Who is online

Users browsing this forum: Google [Bot]