地球页面;反馈页面样式修改
This commit is contained in:
1 parent
3ec6fd0569
commit
2663068574
22 files changed
+5831
-2786
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.101:5084/";
|
||||
public static string Host = "http://192.168.0.101:5184/";
|
||||
|
||||
public static string AppVersion = Application.version;
|
||||
|
||||
|
||||
@@ -30,6 +30,11 @@ public class MainController : BaseScene
|
||||
rectTransform.anchorMax = Vector2.one;
|
||||
rectTransform.offsetMin = Vector2.zero;
|
||||
rectTransform.offsetMax = Vector2.zero;
|
||||
//var rect1 = transform.Find("GameObject").GetComponent<RectTransform>();
|
||||
//rect1.anchorMin = Vector2.zero;
|
||||
//rect1.anchorMax = Vector2.one;
|
||||
//rect1.offsetMin = Vector2.zero;
|
||||
//rect1.offsetMax = Vector2.zero;
|
||||
//transform.Find("ModalPanel").GetComponent<RectTransform>().sizeDelta = new Vector2(844, 390);
|
||||
#endif
|
||||
App.MainDeviceAdapter.StartScan();
|
||||
|
||||
@@ -25,7 +25,7 @@ public class BigMapController : PFUIPanel
|
||||
AbstractMap mapManager;
|
||||
//GameObject cube;
|
||||
//GameObject cube1;
|
||||
GameObject canvas;
|
||||
GameObject canvas,mainContainer;
|
||||
GameObject content;
|
||||
Text keyword;
|
||||
UnityEngine.Object begin;
|
||||
@@ -81,12 +81,21 @@ public class BigMapController : PFUIPanel
|
||||
//mapManager.SetCenterLatitudeLongitude(new Mapbox.Utils.Vector2d(32.051203, 118.771572));
|
||||
|
||||
this.transform.Find("Map").GetComponent<QuadTreeCameraMovement>()._referenceCamera = Camera.main;
|
||||
|
||||
|
||||
canvas = this.transform.Find("Canvas").gameObject;
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
mainContainer = canvas.transform.Find("MainContainer").gameObject;
|
||||
|
||||
#else
|
||||
mainContainer = canvas;
|
||||
#endif
|
||||
canvas.GetComponent<Canvas>().worldCamera = Camera.main;
|
||||
var goList = canvas.transform.Find("SwitchMode");
|
||||
var goList = mainContainer.transform.Find("SwitchMode");
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
SetRounded(goList, 52);
|
||||
#else
|
||||
SetRounded(goList, 64);
|
||||
#endif
|
||||
UIManager.AddEvent(goList.Find("GoList").gameObject, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
mapManager.Destroy();
|
||||
@@ -96,9 +105,12 @@ public class BigMapController : PFUIPanel
|
||||
//DestroyImmediate(this.gameObject);
|
||||
});
|
||||
|
||||
var panel = canvas.transform.Find("Panel");
|
||||
var panel = mainContainer.transform.Find("Panel");
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
base.SetRounded(panel, 20f);
|
||||
#else
|
||||
base.SetRounded(panel, 30f);
|
||||
|
||||
#endif
|
||||
|
||||
var qtcm = this.transform.Find("Map").GetComponent<QuadTreeCameraMovement>();
|
||||
UIManager.AddEvent(panel.gameObject, EventTriggerType.PointerEnter, (e) =>
|
||||
@@ -125,8 +137,11 @@ public class BigMapController : PFUIPanel
|
||||
|
||||
var searchBtn = input.Find("Search").gameObject;
|
||||
UIManager.AddEvent(searchBtn, EventTriggerType.PointerClick, Search);
|
||||
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
tipsObject = Resources.Load("UI/Prefab/MapList/MapItem-Mobile");
|
||||
#else
|
||||
tipsObject = Resources.Load("UI/Prefab/MapList/MapItem");
|
||||
#endif
|
||||
//tips = ((GameObject)Instantiate(tipsObject, canvas.transform.Find("TipsContainer"))).GetComponent<Tips>();
|
||||
//tips.Hide();
|
||||
|
||||
@@ -142,7 +157,7 @@ public class BigMapController : PFUIPanel
|
||||
/// </summary>
|
||||
void BindHeadImage()
|
||||
{
|
||||
var headImage = canvas.transform.Find("HeadImage").GetComponent<RawImage>();
|
||||
var headImage = mainContainer.transform.Find("HeadImage").GetComponent<RawImage>();
|
||||
//var material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
|
||||
var rect = ((RectTransform)headImage.transform).rect;
|
||||
//material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height, 0));
|
||||
@@ -315,7 +330,7 @@ public class BigMapController : PFUIPanel
|
||||
//GameObject direct;
|
||||
void CreateLine(int id, LineItem line)
|
||||
{
|
||||
#region 画线
|
||||
#region 画线
|
||||
List<Vector2d> pp1 = line.Points;
|
||||
var dat = new List<Vector3>();
|
||||
foreach (var item in pp1)
|
||||
@@ -354,13 +369,16 @@ public class BigMapController : PFUIPanel
|
||||
//lineRender.SetVertexCount(dat.Count);
|
||||
lineRender.SetPositions(feat.Points[0].ToArray());
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 添加左边的列表项
|
||||
#region 添加左边的列表项
|
||||
if (linesCache[id].Item == null)
|
||||
{
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var itemObject = Resources.Load("UI/Prefab/BigMap/Mobile/Item");
|
||||
#else
|
||||
var itemObject = Resources.Load("UI/Prefab/BigMap/Item");
|
||||
|
||||
#endif
|
||||
var itemObject1 = (GameObject)Instantiate(itemObject, content.transform, false);
|
||||
var iii = itemObject1.GetComponent<Item>();
|
||||
iii.SetModel(line.Model);
|
||||
@@ -396,9 +414,9 @@ public class BigMapController : PFUIPanel
|
||||
}
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 添加marker
|
||||
#region 添加marker
|
||||
|
||||
if (line.BeginMarker == null)
|
||||
{
|
||||
@@ -437,7 +455,7 @@ public class BigMapController : PFUIPanel
|
||||
line.BeginMarker.transform.position = ConverToPosition(line.Points.First());
|
||||
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
if (line.Selected)
|
||||
{
|
||||
|
||||
@@ -62,12 +62,20 @@ public class EarthController : PFUIPanel
|
||||
//itemObject = Resources.Load("UI/Prefab/BigMap/Item");
|
||||
|
||||
panel = rootPanel.Find("Panel").gameObject;
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
SetRounded(panel.transform, 20);
|
||||
#else
|
||||
SetRounded(panel.transform, 60);
|
||||
#endif
|
||||
panel.gameObject.SetActive(false);
|
||||
|
||||
|
||||
var goList = rootPanel.transform.Find("SwitchMode");
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
SetRounded(goList, 52);
|
||||
#else
|
||||
SetRounded(goList, 64);
|
||||
#endif
|
||||
UIManager.AddEvent(goList.Find("GoList").gameObject, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
//UIManager.PopStack();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Assets.Scripts.Apis;
|
||||
using Assets.Scripts.Apis.Models;
|
||||
using Assets.Scripts.UI.Control;
|
||||
using Assets.Scripts.UI.UIEffect;
|
||||
using DG.Tweening;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
@@ -54,16 +55,26 @@ public class EditUserController : PFUIPanel
|
||||
#else
|
||||
var panel = this.transform.Find("Panel/MainPanel");
|
||||
float? panelTop = null;
|
||||
Debug.Log($"cyp,{panelTop}");
|
||||
UIGradient g1 = transform.Find("Panel/Btn1").GetComponent<UIGradient>()
|
||||
, g2 = transform.Find("Panel/Btn2").GetComponent<UIGradient>();
|
||||
UIManager.AddEvent(transform.Find("Panel/Btn1").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
if (!panelTop.HasValue) panelTop = transform.localPosition.y+185;
|
||||
panel.DOLocalMoveY(panelTop.Value, 0.3f);
|
||||
g1.color1 = Utils.HexToColorHtml("#F93086");
|
||||
g1.color2 = Utils.HexToColorHtml("#ff7485");
|
||||
g2.color1 = Utils.HexToColorHtml("#353543");
|
||||
g2.color2 = Utils.HexToColorHtml("#474759");
|
||||
//.color1 = Utils.HexToColorHtml()
|
||||
});
|
||||
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);
|
||||
g2.color1 = Utils.HexToColorHtml("#F93086");
|
||||
g2.color2 = Utils.HexToColorHtml("#ff7485");
|
||||
g1.color1 = Utils.HexToColorHtml("#353543");
|
||||
g1.color2 = Utils.HexToColorHtml("#474759");
|
||||
});
|
||||
#endif
|
||||
mID = panel.Find("IDNumber").Find("input").Find("Text").GetComponent<Text>();
|
||||
|
||||
@@ -641,7 +641,11 @@ public class UIManager : MonoBehaviour
|
||||
public static void ShowBigMapPanel(double lat = 0, double lon = 0)
|
||||
{
|
||||
UIManager.Instance.MainPanel.gameObject.SetActive(false);
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var obj = Resources.Load("UI/Prefab/Panel/Mobile/BigMapPanel");
|
||||
#else
|
||||
var obj = Resources.Load("UI/Prefab/Panel/BigMapPanel");
|
||||
#endif
|
||||
//var root = UIManager.Instance.MainPanel.transform.parent.parent;
|
||||
var bigMap = (GameObject)Instantiate(obj, UIManager.Instance.Root.transform);
|
||||
bigMap.GetComponent<BigMapController>().Show(lat, lon);
|
||||
|
||||
Reference in new issue
Block a user