【锻器阁】未解锁的功能显示未解锁提示
parent
81ca63fc7e
commit
de178b9875
|
@ -1666,6 +1666,7 @@ FUNCTION_OPEN_TYPE = {
|
||||||
FIGHTLEVEL = 107,--山河社稷图
|
FIGHTLEVEL = 107,--山河社稷图
|
||||||
LikeAbility = 114,--好感度
|
LikeAbility = 114,--好感度
|
||||||
PRACTICE = 108,--修行
|
PRACTICE = 108,--修行
|
||||||
|
Treasure = 109,--宝物
|
||||||
JumpServer_YuXu = 111, -- 玉虚论道
|
JumpServer_YuXu = 111, -- 玉虚论道
|
||||||
QIJIESHILIAN = 112,--七界试炼
|
QIJIESHILIAN = 112,--七界试炼
|
||||||
FOURQUADRANT=113,--四象心法
|
FOURQUADRANT=113,--四象心法
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
CompoundPanel = Inherit(BasePanel)
|
CompoundPanel = Inherit(BasePanel)
|
||||||
local this = CompoundPanel
|
local this = CompoundPanel
|
||||||
local TabBox = require("Modules/Common/TabBox")
|
local TabBox = require("Modules/Common/TabBox")
|
||||||
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[10385] },
|
local _TabData={ [1] = { default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002",select = "r_hero_xuanze_001", name = Language[10385] , funcType = FUNCTION_OPEN_TYPE.COMPOUND},
|
||||||
--[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "宝器锻造" },
|
--[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "宝器锻造" },
|
||||||
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[10386] },
|
[2] = { default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002",select = "r_hero_xuanze_001", name = Language[10386], funcType = FUNCTION_OPEN_TYPE.Treasure },
|
||||||
[3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[10387] },
|
[3] = { default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002",select = "r_hero_xuanze_001", name = Language[10387] , funcType = FUNCTION_OPEN_TYPE.hunyin},
|
||||||
}
|
}
|
||||||
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
||||||
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1)}
|
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1),
|
||||||
|
lock = UIColor.GRAY,
|
||||||
|
}
|
||||||
local curIndex = 1
|
local curIndex = 1
|
||||||
|
|
||||||
this.contents = {
|
this.contents = {
|
||||||
|
@ -90,6 +92,7 @@ function CompoundPanel:OnShow()
|
||||||
this.TabCtrl = TabBox.New()
|
this.TabCtrl = TabBox.New()
|
||||||
this.TabCtrl:SetTabAdapter(this.TabAdapter)
|
this.TabCtrl:SetTabAdapter(this.TabAdapter)
|
||||||
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
|
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
|
||||||
|
this.TabCtrl:SetTabIsLockCheck(this.IsTabLock)
|
||||||
this.TabCtrl:Init(this.tabBox, _TabData, curIndex)
|
this.TabCtrl:Init(this.tabBox, _TabData, curIndex)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -102,13 +105,26 @@ function CompoundPanel:OnSortingOrderChange()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function this.IsTabLock(index)
|
||||||
|
if _TabData[index].funcType and _TabData[index].funcType > 0 then
|
||||||
|
if ActTimeCtrlManager.SingleFuncState(_TabData[index].funcType) then
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
return true, "【".._TabData[index].name.."】"..ActTimeCtrlManager.SystemOpenTip(_TabData[index].funcType)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- tab节点显示自定义
|
-- tab节点显示自定义
|
||||||
function this.TabAdapter(tab, index, status)
|
function this.TabAdapter(tab, index, status)
|
||||||
local tabLab = Util.GetGameObject(tab, "Text")
|
local tabLab = Util.GetGameObject(tab, "Text")
|
||||||
Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(_TabData[index][status])
|
Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(_TabData[index][status])
|
||||||
tabLab:GetComponent("Text").text = _TabData[index].name
|
tabLab:GetComponent("Text").text = _TabData[index].name
|
||||||
tabLab:GetComponent("Text").color = _TabFontColor[status]
|
tabLab:GetComponent("Text").color = _TabFontColor[status]
|
||||||
this.SetBottomBarIsActive(tab, index)
|
Util.GetGameObject(tab,"LockImage"):SetActive(status == "lock")
|
||||||
|
-- this.SetBottomBarIsActive(tab, index)
|
||||||
end
|
end
|
||||||
|
|
||||||
--特殊的开启条件
|
--特殊的开启条件
|
||||||
|
|
Loading…
Reference in New Issue