diff --git a/MoCha/Assets/Scenes/Goals.unity b/MoCha/Assets/Scenes/Goals.unity index 5333b1e..539c701 100644 Binary files a/MoCha/Assets/Scenes/Goals.unity and b/MoCha/Assets/Scenes/Goals.unity differ diff --git a/MoCha/Assets/Scripts/GetGoals.cs b/MoCha/Assets/Scripts/GetGoals.cs index 85d3e1a..6ffadb3 100644 --- a/MoCha/Assets/Scripts/GetGoals.cs +++ b/MoCha/Assets/Scripts/GetGoals.cs @@ -9,7 +9,8 @@ using UnityEngine.UI; namespace PedometerU.Tests { public class GetGoals : MonoBehaviour { - + + public Image background; public Text goalText; public string currentDayStr = System.DateTime.Now.ToString("MM/dd/yyyy"); public string goalDayStr = System.DateTime.Now.ToString("MM/dd/yyyy"); @@ -18,7 +19,7 @@ public class GetGoals : MonoBehaviour { //Progress Bar... public float barDisplay; //current progress private Vector2 barPos; - private Vector2 barSize = new Vector2(227,20); + private Vector2 barSize = new Vector2(725, 39); //Pedometer private Pedometer pedometer; @@ -76,8 +77,9 @@ public class GetGoals : MonoBehaviour { //goalText.text = prefKey; goalText.color = new Color(0f, 0f, 0f); - Debug.Log(goalText.transform.position.x.ToString() + " " + goalText.transform.position.y.ToString()); - barPos = new Vector2(goalText.transform.position.x, goalText.transform.position.y); + Debug.Log(background.rectTransform.anchoredPosition.x.ToString() + " " + background.rectTransform.anchoredPosition.y.ToString()); + + barPos = new Vector2(background.transform.position.x, 2135 - background.transform.position.y); currentDayStr = System.DateTime.Now.ToString("MM/dd/yyyy"); goalDayStr = System.DateTime.Now.ToString("MM/dd/yyyy"); @@ -109,7 +111,7 @@ public class GetGoals : MonoBehaviour { return false; return true; } - + // void OnGUI() { //draw the background: GUI.BeginGroup(new Rect(barPos.x, barPos.y, barSize.x, barSize.y)); @@ -122,6 +124,7 @@ public class GetGoals : MonoBehaviour { GUI.EndGroup(); } + void Update() { //needs current points counting toward this goal (daily?) //needs the total required points for this goal