本帖最后由 老司机飞飞飞 于 2019-5-4 21:19 编辑
还是不知道怎么让焦点始终在最下面,只能限制行数来实现,列表只能定义在python中才能实现替换删除之类的,用define搞不好,原来的有点问题又改了下[RenPy] 纯文本查看 复制代码 init python:
list_zdwb=[]
def dianji():
suiji= renpy.random.randint(1,10)
if suiji >=1 and suiji <=5:
aa = "a"
list_zdwb.append(aa)
elif suiji >=6 and suiji <=8:
bb = "bbbb"
list_zdwb.append(bb)
else:
cc = "cccccccc"
list_zdwb.append(cc)
if len(list_zdwb) > 10:
a = len(list_zdwb)#获取列表长度
result = a - 10
del list_zdwb[:result]
#战斗文本
screen zdwb():
viewport:
xsize 300
ysize 350
align(0.5,0)
draggable True
mousewheel True
arrowkeys True
edgescroll(150,500)
scrollbars "vertical"
vbox:
for y in list_zdwb:
text "[y]"
screen aa():
frame:
align(0.5,0.5)
textbutton "点击" action Jump("tj")
label start:
show screen zdwb
call screen aa
"aaaaaa"
"bbbbbbbbb"
return
label tj():
$ dianji()
jump start |