马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
明明没有在 被 use 的screen 中的textbutton设置隐藏之类的action
但是在点击后会让原来的整个界面都给消失?
这是为什么?
[RenPy] 纯文本查看 复制代码 screen Mybag():
zorder 30
style_prefix "baginfo"
modal True
textbutton "返回" :
text_font"SourceHanSerifCN-Bold.otf"
text_size 20
pos(1204, 608)
action Hide("Mybag")#,Hide("showgoods")
frame:
pos(101, 43)
xysize(798, 556)
background None
vbox:
pos(340,230)
spacing 30
textbutton "所有" action SetVariable("showlist",baglist.copy())#,Show('showgoods')
$ a = ['A','B','C',D']
for i in a :
textbutton "[i]" action Function(sortitems,baglist,i,0)#,Show('showgoods')
vbox:
pos(880,445)
spacing 25
if tp == 0:
textbutton "使用" text_color"#aaaaaa" action Notify('请先选择!')
else:
textbutton "使用" # action None
if tp == 0 :
textbutton "丢弃" text_color"#aaaaaa" action Notify('请先选择!')
else:
textbutton "丢弃" action[Function(trashitem,Ngetitem),
Notify('已丢弃'),SetVariable("tp",0),
SetVariable("showlist",baglist.copy())]
#Show('showgoods')]
use showgoods()
use iteminfo(Ngetitem)
screen showgoods():
frame:
pos (560,200)
xysize (310,400)
background None
viewport:
pos(5,5)
xysize (310,400)
spacing 10
draggable True
mousewheel True
scrollbars "vertical"
has vbox:
if showlist == []:
text "当前没有可查看的"
else:
$ counts = showitems(showlist)
for i,j in counts.items():
hbox:
textbutton "[i]" :
text_size 20
action [SetVariable("tp",1),
Function(checkiteminfo,i)]
text"x[j]" xpos 0.9
screen iteminfo(item):
frame:
pos(930,220)
xysize(200,200)
background None
if item == '无':
text '请选择'
else:
text '[item.description]' size 20
|