【新手剧情】起名界面添加回调

dev_chengFeng
gaoxin 2021-11-15 13:10:59 +08:00
parent f1f407fdd6
commit 5be38dacb1
2 changed files with 5 additions and 4 deletions

View File

@ -146,8 +146,8 @@ function CreateNamePopup:BindEvent()
this.curName = this.textName.text
local callBack = function()
if this.options then
-- self:ClosePanel()
StoryManager.StoryJumpType(this.options[1], self)
self:ClosePanel()
StoryManager.StoryJumpType(this.options[1], nil, this.callBackFunc)
else
PopupTipPanel.ShowTip(Language[10837])
this:ClosePanel()
@ -181,7 +181,7 @@ function CreateNamePopup:BindEvent()
local callBack = function()
if this.options then
self:ClosePanel()
StoryManager.StoryJumpType(this.options[1], self)
StoryManager.StoryJumpType(this.options[1], nil, this.callBackFunc)
-- 发送创建角色事件
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.CreateCharacter)
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.RoleLv,1)
@ -301,6 +301,7 @@ function CreateNamePopup:OnOpen(...)
this.eventId = args[2]
this.showValues = args[3]
this.options = args[4]
this.callBackFunc = args[5]
this.InitName()
this.RefreshShow()
end

View File

@ -49,7 +49,7 @@ function this.EventTrigger(eventId, callBack)
UIManager.OpenPanel(UIName.StoryDialoguePanel, eventId, false)
--UIManager.OpenPanel(UIName.StoryOptionPopup, eventId)
elseif showType == 10 then -- 起名字界面
UIManager.OpenPanel(UIName.CreateNamePopup, showType, eventId, showValues, options)
UIManager.OpenPanel(UIName.CreateNamePopup, showType, eventId, showValues, options, callBack)
elseif showType == 14 then -- 引导战斗
local fdata, fseed = BattleManager.GetFakeBattleData(options[1])
local testFightData = {