蓝牙断开重连相关逻辑优化

This commit is contained in:
lishuo committed 2022-06-13 18:59:02 +08:00
1 parent 87a0e7fb6d
commit f25d0b7b8c
11 files changed
+455 -27

No files matched your search

@@ -44,6 +44,7 @@ public class ConnectDeviceModal : PFUIPanel
private Dictionary<string, DeviceItem> deviceList;
private Text noDevice,Title;
private RectTransform searchIconRect;
private GameObject deviceNotFound;
protected override void Awake()
{
@@ -52,6 +53,7 @@ public class ConnectDeviceModal : PFUIPanel
deviceList = new Dictionary<string, DeviceItem>();
var container = this.transform.Find("GameObject");
deviceNotFound = container.Find("Panel/Error").gameObject;
var closeBtn = container.Find("CloseBtn");
Logo = container.Find("Logo").GetComponent<Image>();
Title = container.Find("Title").GetComponent<Text>();
@@ -259,6 +261,7 @@ public class ConnectDeviceModal : PFUIPanel
//如果没有可连接的设备按钮只读
connectBtn.mButton.enabled = deviceList.Count > 0;
connectBtn.mButton.interactable = deviceList.Count > 0;
deviceNotFound.SetActive(deviceList.Count <= 0);
}
}
//选中需要连接的设备