23 lines
569 B
C#
23 lines
569 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UI_Topicitem : BaseItem
|
|
{
|
|
public Text toggleText;
|
|
public Toggle toggle;
|
|
private ToggleGroup parentToggleGroup;
|
|
|
|
public UI_ExamPanel examPanel;
|
|
public void Init(string Topic)
|
|
{
|
|
toggle = GetControl<Toggle>("Toggle");
|
|
toggleText = GetControl<Text>("Label");
|
|
toggleText.text = Topic;
|
|
parentToggleGroup =gameObject.GetComponentInParent<ToggleGroup>();
|
|
toggle.group = parentToggleGroup;
|
|
}
|
|
}
|
|
|