Code: Select all
screen text_history:
#use navigation
tag menu
$ _window_hide()
add "grp/parts/readback.png"
predict False
if not current_line and len(readback_buffer) == 0:
$ lines_to_show = []
elif current_line and len(readback_buffer) == 0:
$ lines_to_show = [current_line]
elif current_line and not ( ( len(readback_buffer) == 3 and current_line == readback_buffer[-2]) or current_line == readback_buffer[-1]):
$ lines_to_show = readback_buffer + [current_line]
else:
$ lines_to_show = readback_buffer
$ adj = NewAdj(changed = store_yvalue, step = 300)
window:
style_group "readback"
side "c r":
frame:
has viewport
mousewheel True
draggable True
yinitial yvalue
yadjustment adj
vbox:
null height 10
for line in lines_to_show:
if line[0] and line[0] != " ":
label line[0] # name
# if there's no voice just log a dialogue
if not line[2]:
text line[1]
# else, dialogue will be saved as a button of which plays voice when clicked
else:
textbutton line[1] action Play("voice", line[2] )
text line[1]
null height 10
bar adjustment adj style 'vscrollbar'
imagebutton idle "grp/parts/x_readback_idle.png" hover "grp/parts/x_readback_hover.png" xpos 1559 ypos 55 hover_sound "sound/se/se_01.ogg" action [Play("sound", "sound/se/se_03.ogg"), Return()]
key "mouseup_3" action [Play("sound", "sound/se/se_03.ogg"), Return()]
key "K_ESCAPE" action [Play("sound", "sound/se/se_03.ogg"), Return()]
Thank you in advance for your help.