设备连接页加返回按钮

This commit is contained in:
suntao committed 2021-04-01 14:29:58 +08:00
1 parent ae9cefc645
commit e7a3214cb5
2 files changed
+205

No files matched your search

@@ -11,6 +11,7 @@ public class DeviceController : PFUIPanel
{
public Toggle toggle;
private float timer = 1.0f;
private Button mReturnBtn;
protected override void Awake()
{
AntConnector.Instance();
@@ -38,6 +39,12 @@ public class DeviceController : PFUIPanel
this.toggle.transform.GetComponentInChildren<UnityEngine.UI.Text>().color = Color.gray;
}
});
mReturnBtn = this.transform.Find("ReturnBtn").GetComponent<Button>();
UIManager.AddEvent(mReturnBtn.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, new UnityEngine.Events.UnityAction<UnityEngine.EventSystems.BaseEventData>(e =>
{
UIManager.ShowHomePanel();
}));
}
// Update is called once per frame