123456789101112131415161718192021222324252627282930313233343536373839 |
- ---@class KLCareerButtonItem:UIKmlLuaPanelBase
- ---@field view KLCareerButtonItemView
- local KLCareerButtonItem = class(UIKmlLuaPanelBase)
- local this =KLCareerButtonItem
- ---创建时调用一次
- function this:Init()
-
- end
- ---创建或者刷新界面数据时调用
- function this:Refresh()
-
- end
- ---注册UI事件和服务器消息
- function this:RegistEvents()
- end
- function this:Close()
- end
- function this:RefreshToggle(atlas, src, pimg)
- GUI:Toggle_setSrc(self.view.toggle_createrole,atlas,src,pimg)
- end
- function this:RefreshToggleName(id, name)
- self.cfgId = id
- GUI:Text_setString(self.view.text_toggle_createrole, name)
- if id == 1 then
- GUI:Toggle_setIsOn(self.view.toggle_createrole, true)
- end
- end
- function this:SetOnValueChange(func, ui)
- GUI:SetToggleOnValueChange(self.view.toggle_createrole, ui, func, { data = self.cfgId })
- end
- return this
|