public void SetData(string questionName, string describe) { _questionName = questionName; _describe = describe; UICommonTool.SetTextContext(ref _lbQuestionName, questionName); UICommonTool.SetTextContext(ref _lbDescribe, describe); UICommonTool.SetComponentState(ref _lbDescribe, false); ClosePanel(); }
public void Init(GameObject obj, string name, Action <string> clickCallBack) { _obj = obj; titleName = name; _btnQuestionGroup = obj.GetComponent <Button>(); EventTriggerListener.Get(_btnQuestionGroup.gameObject).onClick = (go) => { clickCallBack(titleName); SetBtnBright(); }; _lbQuestionGroupName = obj.GetComponentEx <Text>(Layout.lb_QuestionGroupName); UICommonTool.SetTextContext(ref _lbQuestionGroupName, name); }
/// <summary> /// 设置组件存储的数据 /// </summary> /// <param name="questionName"></param> /// <param name="describe"></param> public void SetData(FeelingVo value) { var tmpStri = value.content; var titleStr = ""; if (tmpStri.Length > 22) { titleStr = tmpStri.Substring(0, 2); } else { titleStr = tmpStri; } UICommonTool.SetTextContext(ref _lbQuestionName, titleStr); UICommonTool.SetTextContext(ref _lbDescribe, tmpStri); UICommonTool.SetComponentState(ref _lbDescribe, false); ClosePanel(); }