赛事筛选;微信角标切口;选择图片功能权限问题

选择图片功能权限问题,需先导出项目,将res/xml文件夹复制到unitylibrary的res文件夹下
This commit is contained in:
Caiyanpeng committed 2021-09-08 10:29:20 +08:00
1 parent 8a4657c11c
commit 5a148c28a8
17 files changed
+1612 -1284

No files matched your search

@@ -57,7 +57,6 @@ public class MapListController : PFUIPanel
//rectTransform.offsetMin = new Vector2(0, offsetMin.y);
var widthDelta = (transform.parent.parent.GetComponent<RectTransform>().sizeDelta.x -
transform.GetComponent<RectTransform>().sizeDelta.x)/2;
Debug.Log(widthDelta);
//筛选按钮
var topRect = topContainer.GetComponent<RectTransform>();
topRect.localPosition = new Vector3(topRect.localPosition.x - widthDelta
@@ -14,7 +14,7 @@ public class RaceListScript : RaceScript
{
// Start is called before the first frame update
private GameObject scroll;
private Transform content,statusOptionContainer, reserveContainer,dirContainer, searchInput,btnReturn,avatar;
private Transform content,statusOptionContainer, reserveContainer,dirContainer, searchInput,btnReturn,avatar, btnFilter,conditions;
private bool startMouse = false,isEnd = false;
private int pageIndex = 0, pageSize = 24;
private string raceName = "";
@@ -70,7 +70,8 @@ public class RaceListScript : RaceScript
content = scroll.GetComponent<ScrollRect>().content;
UIManager.AddEvent(scroll, UnityEngine.EventSystems.EventTriggerType.EndDrag, OnEndDrag);
}
statusOptionContainer = transform.Find("ListContainer/Conditions/StatusContainer");
conditions = transform.Find("Conditions");
statusOptionContainer = conditions.Find("StatusContainer");
if (statusOptionContainer != null)
{
foreach (Transform t in statusOptionContainer)
@@ -140,7 +141,7 @@ public class RaceListScript : RaceScript
}
}
}
reserveContainer = transform.Find("ListContainer/Conditions/ReserveContainer");
reserveContainer = conditions.Find("ReserveContainer");
if (reserveContainer != null)
{
UIManager.AddEvent(reserveContainer.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b=>
@@ -152,7 +153,7 @@ public class RaceListScript : RaceScript
Refresh();
});
}
dirContainer = transform.Find("ListContainer/Conditions/Dir");
dirContainer = transform.Find("Dir");
if (dirContainer != null)
{
var image = dirContainer.Find("Image").GetComponent<Image>();
@@ -171,7 +172,7 @@ public class RaceListScript : RaceScript
Refresh();
});
}
searchInput = transform.Find("ListContainer/Conditions/SearchInput");
searchInput = transform.Find("SearchInput");
if (searchInput != null)
{
//UIManager.AddEvent(searchInput.Find("Button").gameObject, EventTriggerType.PointerClick, (b) =>
@@ -183,7 +184,7 @@ public class RaceListScript : RaceScript
onEndEdit();
});
}
btnReturn = transform.Find("BtnReturn");
btnReturn = transform.Find("SwitchMode/BtnReturn");
if (btnReturn != null)
{
UIManager.AddEvent(btnReturn.gameObject, EventTriggerType.PointerClick, (b) =>
@@ -191,6 +192,8 @@ public class RaceListScript : RaceScript
UIManager.ShowRaceHomePanel(true);
});
}
//Refresh();
}
protected override void Start()
@@ -204,6 +207,33 @@ public class RaceListScript : RaceScript
var rect = transform.GetComponent<RectTransform>();
rect.offsetMax = new Vector2(rect.offsetMax.x, 0);
rect.offsetMin = new Vector2(rect.offsetMin.x, 0);
var widthDelta = (transform.parent.parent.GetComponent<RectTransform>().sizeDelta.x -
transform.GetComponent<RectTransform>().sizeDelta.x) / 2;
var topRect = conditions.GetComponent<RectTransform>();
topRect.localPosition = new Vector3(topRect.localPosition.x - widthDelta
, topRect.localPosition.y, topRect.localPosition.z);
if (!App.topRectStartX.HasValue)
{
App.topRectStartX = topRect.localPosition.x;
}
var mc = transform.Find("MC");
UIManager.AddEvent(transform.Find("SwitchMode/BtnFilter").gameObject, EventTriggerType.PointerClick, b =>
{
conditions.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(mc.gameObject, EventTriggerType.PointerClick, b =>
{
conditions.DOLocalMoveX(App.topRectStartX.Value, 0.3f);
mc.GetComponent<CanvasGroup>().DOFade(0, 0.3f).onComplete = () =>
{
mc.gameObject.SetActive(false);
};
});
#else
#endif
}