修改细节
This commit is contained in:
1 parent
952e5038ed
commit
abf913b467
12 files changed
+198
-79
No files matched your search
@@ -10,10 +10,10 @@ namespace Assets.Scripts.UI.Prefab.Race
|
||||
{
|
||||
public static Dictionary<string, string> statusDict = new Dictionary<string, string>()
|
||||
{
|
||||
{"All","" },
|
||||
{"Not started","1,2" },
|
||||
{"Racing","3" },
|
||||
{"Done","4" },
|
||||
{"Btn1","" },
|
||||
{"Btn2","1,2" },
|
||||
{"Btn3","3" },
|
||||
{"Btn4","4" },
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -40,6 +40,14 @@ public class RaceHomeScript : RaceScript
|
||||
{
|
||||
goLeft();
|
||||
});
|
||||
UIManager.AddEvent(L.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerEnter, (b) =>
|
||||
{
|
||||
L.transform.DOScale(1.1f, 0.2f);
|
||||
});
|
||||
UIManager.AddEvent(L.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerExit, (b) =>
|
||||
{
|
||||
L.transform.DOScale(1f, 0.2f);
|
||||
});
|
||||
}
|
||||
if (R != null)
|
||||
{
|
||||
@@ -47,6 +55,14 @@ public class RaceHomeScript : RaceScript
|
||||
{
|
||||
goRight();
|
||||
});
|
||||
UIManager.AddEvent(R.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerEnter, (b) =>
|
||||
{
|
||||
R.transform.DOScale(1.1f, 0.2f);
|
||||
});
|
||||
UIManager.AddEvent(R.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerExit, (b) =>
|
||||
{
|
||||
R.transform.DOScale(1f, 0.2f);
|
||||
});
|
||||
}
|
||||
StartTime();
|
||||
rightContainer = transform.Find("RightContainer");
|
||||
|
||||
@@ -160,7 +160,9 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
}
|
||||
else
|
||||
{
|
||||
status.Find("Text").GetComponent<Text>().text = mapCompetition.StatusVlaue;
|
||||
status.gameObject.SetActive(true);
|
||||
status.Find("Text").GetComponent<Text>().text =
|
||||
mapCompetition.Status == 2?"Registered":mapCompetition.StatusVlaue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,13 +80,13 @@ public class RaceListScript : RaceScript
|
||||
{
|
||||
image.color = Utils.HexToColorHtml("#F93086");
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
statusOptions.Add(RaceFilterOptions.statusDict[text.text]);
|
||||
statusOptions.Add(RaceFilterOptions.statusDict[t.name]);
|
||||
}
|
||||
else
|
||||
{
|
||||
image.color = c1;
|
||||
text.color = new Color(1, 1, 1, 1);
|
||||
statusOptions.Remove(RaceFilterOptions.statusDict[text.text]);
|
||||
statusOptions.Remove(RaceFilterOptions.statusDict[t.name]);
|
||||
}
|
||||
Transform t1 = statusOptionContainer.GetChild(0);
|
||||
var image1 = t1.GetComponent<Image>();
|
||||
|
||||
@@ -76,10 +76,10 @@ public class RaceScript : PFUIPanel
|
||||
var map = currentItem.GetComponent<RaceItemScript>().mapCompetition;
|
||||
if (map.Status == 1)
|
||||
{
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "Application Start Time";
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "Deadline for Registration";
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text =
|
||||
map.StartApplyTime.ToString("yyyy-MM-dd HH:mm");
|
||||
currentItem.Find("GetReadyContainer-2/Title").GetComponent<Text>().text = "Race Start Time";
|
||||
map.EndApplyTime.ToString("yyyy-MM-dd HH:mm");
|
||||
currentItem.Find("GetReadyContainer-2/Title").GetComponent<Text>().text = "Start Time";
|
||||
currentItem.Find("GetReadyContainer-2/Value").GetComponent<Text>().text =
|
||||
map.StartTime.ToString("yyyy-MM-dd HH:mm");
|
||||
|
||||
@@ -95,7 +95,7 @@ public class RaceScript : PFUIPanel
|
||||
}
|
||||
else if (map.Status == 4)
|
||||
{
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "Race End Time";
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text = "End Time";
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text =
|
||||
map.FirstEndTime.HasValue?
|
||||
map.FirstEndTime.Value.ToString("yyyy-MM-dd HH:mm"):map.EndTime.ToString("yyyy-MM-dd HH:mm");
|
||||
@@ -103,7 +103,7 @@ public class RaceScript : PFUIPanel
|
||||
else
|
||||
{
|
||||
//Dictionary<int,>
|
||||
var time = (map.Status == 2 ? map.StartTime.ToLocalTime() : map.EndTime.ToLocalTime()) - UIManager.Now.GetDateTime();
|
||||
var time = map.StartTime.ToLocalTime() - UIManager.Now.GetDateTime();
|
||||
if (time.TotalSeconds < 0)
|
||||
{
|
||||
currentItem.Find("GetReadyContainer").GetComponent<CanvasGroup>().alpha = 0;
|
||||
@@ -117,9 +117,9 @@ public class RaceScript : PFUIPanel
|
||||
{
|
||||
currentItem.Find("GetReadyContainer").GetComponent<CanvasGroup>().alpha = 1;
|
||||
currentItem.Find("GetReadyContainer/Title").GetComponent<Text>().text
|
||||
= map.Status == 2 ? "Get Ready" : "Riding Time";
|
||||
= map.HasJoin ? "Get Ready" : "Start Time";
|
||||
currentItem.Find("GetReadyContainer/Value").GetComponent<Text>().text
|
||||
= Utils.GetCountDown(time);
|
||||
= map.HasJoin ? Utils.GetCountDown(time): map.StartTime.ToString("yyyy-MM-dd HH:mm");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,15 +41,16 @@ public class DownloadWorkoutsController : PFUIPanel
|
||||
UIManager.AddEvent(Exit.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
//UIManager.CloseConfirm();
|
||||
if (request != null)
|
||||
//UIManager.ShowConfirm("1", "2", () => { });
|
||||
if (request != null)
|
||||
{
|
||||
request.Abort();
|
||||
}
|
||||
if (_fs != null)
|
||||
if (_fs != null)
|
||||
{
|
||||
_fs.Close();
|
||||
}
|
||||
if (_netStream != null)
|
||||
if (_netStream != null)
|
||||
{
|
||||
_netStream.Close();
|
||||
}
|
||||
@@ -62,7 +63,11 @@ public class DownloadWorkoutsController : PFUIPanel
|
||||
UIManager.AddEvent(Btn.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (b) =>
|
||||
{
|
||||
//Application.Quit();
|
||||
Utils.ExecFile(path);
|
||||
UIManager.ShowConfirm("Confirm", @"Switch to PowerFun Workouts? We will close the Powerfun and start PowerFun Workouts", () =>
|
||||
{
|
||||
Utils.ExecFile(path);
|
||||
UIManager.CloseConfirm();
|
||||
});
|
||||
});
|
||||
UIManager.AddEvent(BtnStart.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick,async (_base) =>
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user