protected void registerStype() { LabelStyleBase lblStyle = new LabelStyleBase(); addWidgetStype(WidgetStyleID.eWSID_Text, (int)LabelStyleID.eLSID_None, lblStyle); ButtonStyleBase btnStyle = new ButtonStyleBase(); addWidgetStype(WidgetStyleID.eWSID_Button, (int)BtnStyleID.eBSID_None, btnStyle); }
// 初始构造 public AuxLabel(GameObject pntNode, string path, LabelStyleID styleId = LabelStyleID.eLSID_None) { m_selfGo = UtilApi.TransFindChildByPObjAndPath(pntNode, path); m_text = UtilApi.getComByP <Text>(pntNode, path); m_labelStyle = Ctx.m_instance.m_widgetStyleMgr.GetWidgetStyle <LabelStyleBase>(WidgetStyleID.eWSID_Text, (int)styleId); if (m_labelStyle.needClearText()) { m_text.text = ""; } }
// 初始构造 public AuxLabel(GameObject pntNode, string path, LabelStyleID styleId = LabelStyleID.eLSID_None) { m_selfGo = UtilApi.TransFindChildByPObjAndPath(pntNode, path); m_text = UtilApi.getComByP<Text>(pntNode, path); m_labelStyle = Ctx.m_instance.m_widgetStyleMgr.GetWidgetStyle<LabelStyleBase>(WidgetStyleID.eWSID_Text, (int)styleId); if(m_labelStyle.needClearText()) { m_text.text = ""; } }