修改细节
This commit is contained in:
1 parent
1002b0433a
commit
86a5b68317
39 files changed
+3489
-2760
No files matched your search
@@ -8,6 +8,7 @@ using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using Assets.Scripts.Devices.Ant.Interfaces;
|
||||
using Assets.Scripts.UI.Control;
|
||||
using Assets.Scripts;
|
||||
|
||||
public class ConnectDeviceModal : PFUIPanel
|
||||
{
|
||||
@@ -21,7 +22,17 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
{
|
||||
Debug.Log(value);
|
||||
mSensorType = value;
|
||||
Logo.sprite = Resources.Load<Sprite>("Images/Devices/Trainer_3");
|
||||
var deviceInfoStr = Utils.deviceDict[value.ToString()];
|
||||
if (deviceInfoStr != null)
|
||||
{
|
||||
var deviceInfo = deviceInfoStr.Split('|');
|
||||
if (deviceInfo.Length == 2)
|
||||
{
|
||||
Title.text = deviceInfo[0];
|
||||
Logo.sprite = Resources.Load<Sprite>(deviceInfo[1]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
private Image Logo;
|
||||
@@ -29,7 +40,7 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
private VerticalLayoutGroup content;
|
||||
private PfUIButton connectBtn;
|
||||
private Dictionary<ushort, DeviceItem> deviceList;
|
||||
private Text noDevice;
|
||||
private Text noDevice,Title;
|
||||
private RectTransform searchIconRect;
|
||||
|
||||
protected override void Awake()
|
||||
@@ -41,6 +52,7 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
var container = this.transform.Find("GameObject");
|
||||
var closeBtn = container.Find("CloseBtn");
|
||||
Logo = container.Find("Logo").GetComponent<Image>();
|
||||
Title = container.Find("Title").GetComponent<Text>();
|
||||
var panel = container.Find("Panel");
|
||||
content = panel.Find("Scroll View").Find("Viewport").Find("Content").GetComponent<VerticalLayoutGroup>();
|
||||
|
||||
|
||||
Reference in new issue
Block a user