---@class KLUIPrivilegeIntroducePanel:UIKmlLuaPanelBase
---@field view KLUIPrivilegeIntroducePanelView
local KLUIPrivilegeIntroducePanel = class(UIKmlLuaPanelBase)
local this =KLUIPrivilegeIntroducePanel
---创建时调用一次
function this:Init()
GUI:DataListInitData( self.view.datalist_introduce,function()
return self:ListItemCountFunc()
end,function(realIndex)
return self:ListItemGetFunc(realIndex)
end,function(realIndex, kmlcontrol)
return self:ListItemInitFunc(realIndex, kmlcontrol)
end, function(realIndex, kmlcontrol)
return self:ListItemUpdateFunc(realIndex, kmlcontrol)
end)
end
function this:ListItemCountFunc()
return #self.introduceList
end
function this:ListItemGetFunc(realIndex)
end
function this:ListItemInitFunc(realIndex, kmlcontrol)
end
function this:ListItemUpdateFunc(realIndex, kmlcontrol)
local text = GUI:GetChildControl(self.view.datalist_introduce, realIndex, "text_introduce")
GUI:Text_setString(text, self.introduceList[realIndex + 1])
end
---注册UI事件和服务器消息
function this:RegistEvents()
GUI:AddOnClickEvent(self.view.button_close, self, self.CloseSelf)
end
---创建或者刷新界面数据时调用
function this:Refresh()
self.introduceList = self:GetTotalDescription()
GUI:DataListUpdateData(self.view.datalist_introduce)
end
function this:GetTotalDescription()
return {
"1.可以消耗月卡时间兑换黄金特权或钻石特权获取超额收益。",
"2.使用黄金特权卡后激活30天黄金特权",
"激活后可获得以下特权",
"·开启黄金线",
"·黄金线中额外享受50%的经验、掉落加成",
"·开启小怪挂机保护功能",
"·背包空间增加160格",
"·开启自动买药",
"·开启随身商店功能",
"·开启加点方案切换",
"3.使用钻石特权卡后激活30天钻石特权",
"激活后可获得以下特权",
"·装备掉率增加100%",
"·怪物经验增加100%",
"·奇迹而回收价增加30%",
"·开启黄金怪挂机功能",
"·背包空间增加320格",
"·开启远程仓库",
"·增加交易行寄售格子5格",
}
end
function this:CloseSelf()
GUI:UIPanel_Close("dev/outui/Privilege/Panel/KLUIPrivilegeIntroduce/KLUIPrivilegeIntroducePanel")
end
function this:Close()
end
return this