|
@@ -70,8 +70,8 @@ public class DeviceBatteryView : MonoBehaviour
|
|
|
if (value == 0) active = false;
|
|
if (value == 0) active = false;
|
|
|
Image img = this.transform.Find($"Layout/Frame{deviceID}/Bar").GetComponent<Image>();
|
|
Image img = this.transform.Find($"Layout/Frame{deviceID}/Bar").GetComponent<Image>();
|
|
|
Text txt =this.transform.Find($"Layout/Frame{deviceID}/Value").GetComponent<Text>();
|
|
Text txt =this.transform.Find($"Layout/Frame{deviceID}/Value").GetComponent<Text>();
|
|
|
|
|
+ this.transform.Find($"Layout/Label{deviceID}").gameObject.SetActive(active);
|
|
|
img.transform.parent.gameObject.SetActive(active);
|
|
img.transform.parent.gameObject.SetActive(active);
|
|
|
- txt.transform.parent.gameObject.SetActive(active);
|
|
|
|
|
img.fillAmount = value / 100f;
|
|
img.fillAmount = value / 100f;
|
|
|
txt.text = ((int) value) + "%";
|
|
txt.text = ((int) value) + "%";
|
|
|
}
|
|
}
|