2023-07-14 19:35:33 +00:00
|
|
|
local XUiGridHelpCourse = XClass(nil, "XUiGridHelpCourse")
|
|
|
|
|
|
|
|
function XUiGridHelpCourse:Ctor(ui)
|
|
|
|
self.GameObject = ui.gameObject
|
|
|
|
self.Transform = ui.transform
|
|
|
|
XTool.InitUiObject(self)
|
|
|
|
end
|
|
|
|
|
|
|
|
function XUiGridHelpCourse:Refresh(icon, index, length)
|
2024-09-01 20:49:41 +00:00
|
|
|
local visible=index>1
|
|
|
|
|
2023-07-14 19:35:33 +00:00
|
|
|
self.GridHelp:SetRawImage(icon)
|
|
|
|
self.ImgArrowNext.gameObject:SetActive(length > index)
|
2024-09-01 20:49:41 +00:00
|
|
|
|
|
|
|
if visible then
|
|
|
|
self.TxtPages.text = tostring(length-1)
|
|
|
|
self.TxtNumber.text = tostring(index-1)
|
|
|
|
end
|
|
|
|
|
|
|
|
self:SetPageCounterDisplay(visible)
|
|
|
|
end
|
|
|
|
|
|
|
|
function XUiGridHelpCourse:SetPageCounterDisplay(visible)
|
|
|
|
self.TxtPages.gameObject:SetActiveEx(visible)
|
|
|
|
self.TxtNumber.gameObject:SetActiveEx(visible)
|
|
|
|
self.Txt.gameObject:SetActiveEx(visible)
|
2023-07-14 19:35:33 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return XUiGridHelpCourse
|