比赛;编辑页面
This commit is contained in:
1 parent
85130ce6c3
commit
3ec6fd0569
56 files changed
+16371
-2749
No files matched your search
@@ -2,6 +2,7 @@
|
||||
using Assets.Scripts.Apis;
|
||||
using Assets.Scripts.Apis.Models;
|
||||
using Assets.Scripts.UI.Control;
|
||||
using DG.Tweening;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
@@ -48,8 +49,23 @@ public class EditUserController : PFUIPanel
|
||||
{
|
||||
Debug.Log(Utils.GetIP(Utils.ADDRESSFAM.IPv4));
|
||||
userApi = new UserApi();
|
||||
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
var panel = this.transform.Find("Panel");
|
||||
#else
|
||||
var panel = this.transform.Find("Panel/MainPanel");
|
||||
float? panelTop = null;
|
||||
Debug.Log($"cyp,{panelTop}");
|
||||
UIManager.AddEvent(transform.Find("Panel/Btn1").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
if (!panelTop.HasValue) panelTop = transform.localPosition.y+185;
|
||||
panel.DOLocalMoveY(panelTop.Value, 0.3f);
|
||||
});
|
||||
UIManager.AddEvent(transform.Find("Panel/Btn2").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
if (!panelTop.HasValue) panelTop = transform.localPosition.y+185;
|
||||
panel.DOLocalMoveY(panelTop.Value + 370, 0.3f);
|
||||
});
|
||||
#endif
|
||||
mID = panel.Find("IDNumber").Find("input").Find("Text").GetComponent<Text>();
|
||||
mSexDropdown = panel.Find("SexDropdown").GetComponent<PFUIDropdown>();
|
||||
mSexDropdown = panel.Find("SexDropdown").GetComponent<PFUIDropdown>();
|
||||
|
||||
@@ -41,8 +41,44 @@ public class MapListController : PFUIPanel
|
||||
}
|
||||
}
|
||||
private bool isEnd = false;
|
||||
private Transform topContainer;
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
#if (UNITY_ANDROID || UNITY_IOS)
|
||||
topContainer = transform.Find("Top");
|
||||
var rectTransform = transform.GetComponent<RectTransform>();
|
||||
var offsetMax = rectTransform.offsetMax;
|
||||
rectTransform.offsetMax = new Vector2(0, offsetMax.y);
|
||||
var offsetMin = rectTransform.offsetMin;
|
||||
rectTransform.offsetMin = new Vector2(0, offsetMin.y);
|
||||
//筛选按钮
|
||||
var topRect = topContainer.GetComponent<RectTransform>();
|
||||
if (!App.topRectStartX.HasValue)
|
||||
{
|
||||
App.topRectStartX = topRect.localPosition.x;
|
||||
}
|
||||
|
||||
var mc = transform.Find("MC");
|
||||
UIManager.AddEvent(transform.Find("Panel/BtnFilter").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
topContainer.DOLocalMoveX(App.topRectStartX.Value - topRect.rect.width, 0.3f);
|
||||
mc.gameObject.SetActive(true);
|
||||
mc.GetComponent<CanvasGroup>().alpha = 0;
|
||||
mc.GetComponent<CanvasGroup>().DOFade(1, 0.3f);
|
||||
});
|
||||
UIManager.AddEvent(topContainer.Find("BtnCancel").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
topContainer.DOLocalMoveX(App.topRectStartX.Value, 0.3f);
|
||||
mc.GetComponent<CanvasGroup>().DOFade(0, 0.3f).onComplete = () =>
|
||||
{
|
||||
mc.gameObject.SetActive(false);
|
||||
};
|
||||
});
|
||||
map = Resources.Load<GameObject>("UI/Prefab/MapList/MapItem-Mobile");
|
||||
#else
|
||||
topContainer = transform.Find("Panel").Find("Top");
|
||||
#endif
|
||||
sort = "Near";
|
||||
sortDire = "asc";
|
||||
//if (hardSelector != null)
|
||||
@@ -69,14 +105,14 @@ public class MapListController : PFUIPanel
|
||||
// layout.cellSize = new Vector2((width - 120) / 5, (width - 120) / 5);
|
||||
//}
|
||||
}
|
||||
distanceOptions = transform.Find("Panel").Find("Top").Find("distanceOptions");
|
||||
distanceOptions = topContainer.Find("distanceOptions");
|
||||
if (distanceOptions != null)
|
||||
{
|
||||
var dDropdown = distanceOptions.GetComponent<Dropdown>();
|
||||
dDropdown.options = MapFilterOptions.distances;
|
||||
dDropdown.onValueChanged.AddListener(ChangeDistance);
|
||||
}
|
||||
diffOptions = transform.Find("Panel").Find("Top").Find("DifficultyContainer");
|
||||
diffOptions = topContainer.Find("DifficultyContainer");
|
||||
if (diffOptions != null)
|
||||
{
|
||||
foreach (Transform t in diffOptions)
|
||||
@@ -130,8 +166,8 @@ public class MapListController : PFUIPanel
|
||||
UIManager.ShowHomePanel();
|
||||
});
|
||||
}
|
||||
tdContainer = transform.Find("Panel").Find("Top").Find("3dContainer");
|
||||
favContainer = transform.Find("Panel").Find("Top").Find("FavContainer");
|
||||
tdContainer = topContainer.Find("3dContainer");
|
||||
favContainer = topContainer.Find("FavContainer");
|
||||
if (tdContainer != null)
|
||||
{
|
||||
UIManager.AddEvent(tdContainer.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||
@@ -154,7 +190,7 @@ public class MapListController : PFUIPanel
|
||||
Refresh();
|
||||
});
|
||||
}
|
||||
searchInput = transform.Find("Panel").Find("Top").Find("SearchInput");
|
||||
searchInput = topContainer.Find("SearchInput");
|
||||
if (searchInput != null)
|
||||
{
|
||||
//searchInput.GetComponent<InputField>().onEndEdit.AddListener((s) =>
|
||||
@@ -167,7 +203,7 @@ public class MapListController : PFUIPanel
|
||||
onEndEdit();
|
||||
});
|
||||
}
|
||||
sorts = transform.Find("Panel").Find("Top").Find("FilterOptions");
|
||||
sorts = topContainer.Find("FilterOptions");
|
||||
if (sorts != null)
|
||||
{
|
||||
var drop = sorts.GetComponent<Dropdown>();
|
||||
@@ -195,7 +231,7 @@ public class MapListController : PFUIPanel
|
||||
Refresh();
|
||||
});
|
||||
}
|
||||
sortDir = transform.Find("Panel").Find("Top").Find("Dir");
|
||||
sortDir = topContainer.Find("Dir");
|
||||
if (sortDir)
|
||||
{
|
||||
var image = sortDir.Find("Image").GetComponent<Image>();
|
||||
|
||||
Reference in new issue
Block a user