local HeroAttrUI = class("HeroAttrUI", BaseUI) function HeroAttrUI:isFullScreen() return false end function HeroAttrUI:getPrefabPath() return "assets/prefabs/ui/hero/hero_attr_all_ui.prefab" end function HeroAttrUI:onPressBackspace() self:closeUI() end function HeroAttrUI:ctor() end function HeroAttrUI:onLoadRootComplete() local uiMap = self.root:genAllChildren() self.root:addClickListener(function() self:closeUI() end) uiMap["hero_attr_all_ui.content.close_btn"]:addClickListener(function() self:closeUI() end) uiMap["hero_attr_all_ui.content.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_30)) uiMap["hero_attr_all_ui.content.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_26)) uiMap["hero_attr_all_ui.content.hp_desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_27)) uiMap["hero_attr_all_ui.content.atk_desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_28)) uiMap["hero_attr_all_ui.content.bar_bg.slider_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_29)) self.slider = uiMap["hero_attr_all_ui.content.bar_bg.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) self.hpAttrTx = uiMap["hero_attr_all_ui.content.hp_attr_tx"] self.atkAttrTx = uiMap["hero_attr_all_ui.content.atk_attr_tx"] end function HeroAttrUI:onRefresh() self.slider.value = 0.76 self.hpAttrTx:setText("100") self.atkAttrTx:setText("100") end return HeroAttrUI