I want to display text messages that emulate a chat,
I want the messages to appear one by one, and I want them to be reviewed with a scroll bar ...
Something like that:
This is the script I have, but I don't know how to put pauses between the messages ...
Code: Select all
screen viewport_example():
side "c r":
area (60, 150, 1150, 470)
viewport id "vp":
draggable True
vbox:
spacing 10
xalign 0.5
yalign 0.8
frame:
background Solid("#00000070")
text "{color=#dea0b8}{b}PJ 1{/color}{/b}\nText1"
add "pic3.png"
frame:
background Solid("#00000070")
text "{color=#db9e7d}{b}PJ 2{/color}{/b} \nText 2"
frame:
background Solid("#00000070")
text "{color=#7db1db}{b}PJ 3{/color}{/b} \nText 3 text 3 text 3 \nText 3 text 3 text 3 text 3 text 3text 3 text 3 \nText 3 text 3 text 3\nText 3 text 3 text 3 text 3 text 3 \nText 3 text 3 text 3 text 3 text 3text 3 text 3 \nText 3 text 3 text 3\nText 3 text 3 text 3 text 3 text 3"
frame:
background Solid("#00000070")
text "{color=#db9e7d}{b}PJ 2{/color}{/b} \nText 4 text 4 text 4 \nText 4 text 4 text 4\ nText 4 text 4 text 4"
textbutton _("Reply") action Return()
vbar value YScrollValue("vp")
# El juego comienza aquí.
label start:
scene gui_cel2
call screen viewport_example
scene bg
menu:
"Reply1.-":
jump fin
"Reply2.-":
jump fin
label fin:
"End"
return
I have seen other topics with message systems but
1. one message replaces another
2. the messages are displayed but they are lost as they do not have a scroll bar
And that's not what I'm looking for...
I don't know if I'm on the right track or if there is an easier way to do things, I would really appreciate any help you can give me.