请问如何隐藏PGM的对话?



gvc051126
2011-02-15 17:15:06

请问如何隐藏PGM的对话?
我试着改脚本,在PGEventScene:KeyDown(key)下添加如下代码
elseif key==PSP_BUTTON_TRIANGLE then
local code = am_dialog:gettopcode()
if code and code.type==PGD_WAITKEY then
texfgoff(1);fgoff(2);
am_dialog:clear()

end
elseif key==PSP_BUTTON_SQUARE then
local code = am_dialog:gettopcode()
if code and code.type==PGD_WAITKEY then
texfgon(1);fgon(2)

end
可以隐藏和显示name和对话框,但文字部分只能消掉不能复现,望高手指导,实现旧版的隐藏对话功能,谢谢


白枫
2011-02-15 17:24:52

把这个脚本放到user目录,在am_init.lua前面加入代码:include("HideScene.lua"),然后在任何地方调用drawhide()都会进入隐藏对话框的模式,对话框号码的设置在HideScene.lua开头的HIDE_FG_INDEX = 6这句,这是fg的号码,被设定的号码被认为是对话框并在模式中进行隐藏

[attach]20353[/attach]


gvc051126
2011-02-15 17:35:16

[b]回复 [url=http://www.yayabo.cn/redirect.php?goto=findpost&pid=204561&ptid=16467]2#[/url] [i]白枫[/i] [/b]

太感谢了


king71036
2011-02-15 20:04:28

沙發兄正解