ios选择图片功能,结果列表扩大
This commit is contained in:
1 parent
510cd11049
commit
fe65b83c89
12 files changed
+295
-31
No files matched your search
@@ -11,7 +11,7 @@ using Assets.Scripts.Devices;
|
||||
|
||||
public static class App
|
||||
{
|
||||
public static string Host = "http://192.168.0.102:5082/";
|
||||
public static string Host = "http://192.168.0.101:5184/";
|
||||
|
||||
public static string AppVersion = Application.version;
|
||||
|
||||
@@ -85,7 +85,6 @@ public static class App
|
||||
public readonly static bool isFullScreen = width/height>1.8;
|
||||
static App()
|
||||
{
|
||||
Debug.Log(isFullScreen);
|
||||
#if !UNITY_EDITOR
|
||||
//Host = "http://pf.juze.pro/";
|
||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||
|
||||
@@ -6,16 +6,23 @@ using UnityEngine;
|
||||
public class ImageSelectorController
|
||||
{
|
||||
private AndroidJavaObject mainActivityObject = null;
|
||||
|
||||
#if UNITY_IOS
|
||||
[DllImport("__Internal")]
|
||||
private static extern void IOS_OpenCamera();
|
||||
[DllImport("__Internal")]
|
||||
private static extern void IOS_OpenAlbum();
|
||||
#endif
|
||||
private static ImageSelectorController _instance;
|
||||
public static ImageSelectorController Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
#if !UNITY_EDITOR
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = new ImageSelectorController();
|
||||
}
|
||||
#endif
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
@@ -30,6 +37,10 @@ public class ImageSelectorController
|
||||
}
|
||||
public void Select()
|
||||
{
|
||||
#if UNITY_IOS
|
||||
IOS_OpenAlbum();
|
||||
#else
|
||||
mainActivityObject.Call("Select");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -47,13 +47,18 @@ public class MapListController : PFUIPanel
|
||||
{
|
||||
#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 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 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
|
||||
, topRect.localPosition.y, topRect.localPosition.z);
|
||||
if (!App.topRectStartX.HasValue)
|
||||
{
|
||||
App.topRectStartX = topRect.localPosition.x;
|
||||
|
||||
@@ -15,6 +15,9 @@ public class ResultListPanelController : PFUIPanel
|
||||
{
|
||||
UIManager.SwitchAccount();
|
||||
});
|
||||
var rect = transform.GetComponent<RectTransform>();
|
||||
rect.offsetMax = new Vector2(rect.offsetMax.x, 0);
|
||||
rect.offsetMin = new Vector2(rect.offsetMin.x, 0);
|
||||
}
|
||||
public override void Show()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user