iosbug;android不需要导出项目;修改样式;可修改头像

This commit is contained in:
Caiyanpeng committed 2021-09-09 15:44:28 +08:00
1 parent 50ad74bb09
commit f1f982b90c
28 files changed
+500 -94

No files matched your search

@@ -1,5 +1,6 @@
using Assets.Scripts;
using Assets.Scripts.Apis;
using Assets.Scripts.Mobile.Interface;
using Assets.Scripts.UI.Control;
using System;
using System.Collections;
@@ -9,7 +10,7 @@ using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class FeedbackController : PFUIPanel
public class FeedbackController : PFUIPanel, INativeOnMobileImageSelect
{
// Start is called before the first frame update
Transform main,images;
@@ -80,7 +81,7 @@ public class FeedbackController : PFUIPanel
{
#if UNITY_ANDROID || UNITY_IOS
selectObject = ((PointerEventData)e).pointerEnter;
App.imageSelectorController.Select();
App.imageSelectorController.Select("FeedbackModal(Clone)");
#else
var self = ((PointerEventData)e).pointerEnter;
Utils.OpenFile((path) =>
@@ -1,6 +1,7 @@
using Assets.Scripts;
using Assets.Scripts.Apis;
using Assets.Scripts.Apis.Models;
using Assets.Scripts.Mobile.Interface;
using Assets.Scripts.UI.Control;
using Assets.Scripts.UI.UIEffect;
using DG.Tweening;
@@ -17,7 +18,7 @@ using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class EditUserController : PFUIPanel
public class EditUserController : PFUIPanel, INativeOnMobileImageSelect
{
private Button mSaveButton;
private PFUIDropdown mSexDropdown;
@@ -104,6 +105,7 @@ public class EditUserController : PFUIPanel
UIManager.AddEvent(mBackButton.gameObject, EventTriggerType.PointerClick, Cancel);
UIManager.AddEvent(mChangeAvatar.gameObject, EventTriggerType.PointerClick, (e) =>
{
#if !(UNITY_ANDROID || UNITY_IOS)
OpenFileName ofn = new OpenFileName();
ofn.structSize = Marshal.SizeOf(ofn);
@@ -131,6 +133,9 @@ public class EditUserController : PFUIPanel
{
ChangeAvatar(ofn.file);
}
#else
App.imageSelectorController.Select("EditUserPanel(Clone)");
#endif
});
linkContainer = transform.Find("LinkContainer");
@@ -425,4 +430,13 @@ public class EditUserController : PFUIPanel
// UIManager.ShowPrePanel();
//}
}
public void OnMobileImageSelect(string res)
{
if (res.IndexOf("true,") == 0)
{
var path = res.Replace("true,", "");
ChangeAvatar(path);
}
}
}
@@ -138,7 +138,7 @@ public class HomeController : PFUIPanel
}
else
{
UIManager.ShowConfirm("未检测到应用", "是否前往官网下载?", () =>
UIManager.ShowConfirm("Workouts not installed", "Go to the official website to download?", () =>
{
UIManager.CloseConfirm();
Application.OpenURL("http://www.powerfun.com/Download");
@@ -165,11 +165,17 @@ public class RaceHomeScript : RaceScript
//{
// banner.GetComponent<RawImage>().color = Utils.HexToColorHtml("#0000ff");
//}
UIManager.AddEvent(banner.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
#if !(UNITY_ANDROID || UNITY_IOS)
UIManager.AddEvent(banner, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
{
OnBannerClick(activity);
});
#else
UIManager.AddEvent(banner.transform.Find("BtnEnter").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
{
OnBannerClick(activity);
});
#endif
banner.transform.SetParent(scroll.content);
dot.GetComponent<Image>().color =
i == 0 ? Utils.HexToColorHtml("#f93086") : Utils.HexToColorHtml("#ffffff");