培训考核三期,新版培训,网页版培训登录器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

33 lines
724 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;
using System;
public class PostsItem : MonoBehaviour
{
public Toggle M_Toggle;
public TMP_Text M_ShowText;
public Posts M_BindData;
public PostsLoadPanel M_OpPanel;
void Start()
{
M_Toggle.onValueChanged.AddListener(M_Toggle_ValueChanged);
}
private void M_Toggle_ValueChanged(bool IsOn)
{
if (M_OpPanel)
{
M_OpPanel.OnSelect(M_BindData, IsOn);
}
}
public void DataBind(Posts data, PostsLoadPanel panel)
{
this.M_BindData = data;
this.M_OpPanel = panel;
M_ShowText.text = data.Name;
}
}