修改细节
This commit is contained in:
1 parent
e8a12452ca
commit
baab5a9fb0
10 files changed
+1960
-842
No files matched your search
@@ -15,7 +15,7 @@ using System.Timers;
|
||||
|
||||
public static class App
|
||||
{
|
||||
public static string Host = "http://192.168.0.101:5085/";
|
||||
public static string Host = "http://192.168.0.101:5084/";
|
||||
|
||||
public static string AppVersion = Application.version;
|
||||
|
||||
@@ -108,7 +108,7 @@ public static class App
|
||||
//Host = "http://192.168.0.101:5087/";
|
||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
||||
Host = "https://wx.powerfun.com.cn/";
|
||||
Host = "http://192.168.0.101:5085/";
|
||||
UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000);
|
||||
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001);
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ public class LoginController : BaseScene
|
||||
UIManager.SetModalPanel(transform.Find("ModalPanel").GetComponent<PFUIPanel>());
|
||||
if (!string.IsNullOrEmpty(App.is401))
|
||||
{
|
||||
Utils.showToast(null, App.is401);
|
||||
UIManager.ShowAlert("WARNING", "Your account has been logged in on other devices. If you did not do it yourself, please change your password in time.");
|
||||
}
|
||||
Init();
|
||||
if (loginScrollView != null)
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using DG.Tweening;
|
||||
using Assets.Scripts.UI.Control;
|
||||
using System;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public class AlertV1 : PFUIPanel
|
||||
{
|
||||
private PFUIText _title;
|
||||
private PFUIText _content;
|
||||
private PfUIButton _ok;
|
||||
|
||||
private PfUIButton _cancel;
|
||||
protected override void Awake()
|
||||
{
|
||||
//var rect = this.gameObject.AddComponent<RectTransform>();
|
||||
//var layout = this.gameObject.AddComponent<VerticalLayoutGroup>();
|
||||
//layout.spacing = 20f;
|
||||
//layout.childAlignment = TextAnchor.MiddleCenter;
|
||||
|
||||
var wrap = this.transform.Find("GameObject");
|
||||
_title = wrap.Find("Title").GetComponent<PFUIText>();
|
||||
_content = wrap.Find("Content").GetComponent<PFUIText>();
|
||||
//text.transform.SetParent(layout.transform);
|
||||
//text.text = "阿斯达克法拉盛地方";
|
||||
///text = layout.transform.GetChild(0).gameObject.AddComponent<Text>();
|
||||
|
||||
//text = GetComponentInChildren<Transform>().gameObject.AddComponent<Text>();
|
||||
|
||||
_ok = wrap.Find("Ok").GetComponent<PfUIButton>();
|
||||
_cancel = wrap.Find("Cancel").GetComponent<PfUIButton>();
|
||||
//button.onClick.AddListener(() =>
|
||||
//{
|
||||
// this.Close();
|
||||
// //this.Destroy(true);
|
||||
// //DestroyImmediate(this);
|
||||
//});
|
||||
UIManager.AddEvent(_ok.gameObject, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
this.Close();
|
||||
});
|
||||
UIManager.AddEvent(_cancel.gameObject, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
this.Close();
|
||||
});
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
protected override void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Set(string title, string content)
|
||||
{
|
||||
//if(text == null)
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
//text.text = txt;
|
||||
_title.Text = title;
|
||||
_content.Text = content;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Show()
|
||||
{
|
||||
var panel = this.transform.Find("Panel");
|
||||
var bg = panel.GetComponent<Image>();
|
||||
//bg.alphaHitTestMinimumThreshold
|
||||
|
||||
var color = bg.color;
|
||||
color.a = 0.6f;
|
||||
bg.color = color;
|
||||
base.Show();
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
var panel = this.transform.Find("Panel");
|
||||
var bg = panel.GetComponent<Image>();
|
||||
|
||||
bg.DOFade(0, 0.2f).OnComplete(() =>
|
||||
{
|
||||
this.gameObject.SetActive(false);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: faa1e2e3946e08546b5b6a80dd5b01d0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -223,7 +223,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
}
|
||||
else
|
||||
{
|
||||
UIManager.ShowAlert(r.errMsg);
|
||||
UIManager.ShowAlert("WARNING", r.errMsg);
|
||||
}
|
||||
}
|
||||
NearRouteModel model { get; set; }
|
||||
|
||||
@@ -917,8 +917,8 @@ public class UIManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
Alert alert = null;
|
||||
public static void ShowAlert(string msg)
|
||||
AlertV1 alert = null;
|
||||
public static void ShowAlert(string title,string msg)
|
||||
{
|
||||
if (UIManager.Instance == null)
|
||||
{
|
||||
@@ -927,14 +927,14 @@ public class UIManager : MonoBehaviour
|
||||
|
||||
if (UIManager.Instance.alert == null)
|
||||
{
|
||||
UIManager.Instance.alert = UIManager.Instance.GetInstance<Alert>("Alert", ref UIManager.Instance.alert);
|
||||
UIManager.Instance.alert.SetText(msg);
|
||||
UIManager.Instance.alert = UIManager.Instance.GetInstance<AlertV1>("Alert", ref UIManager.Instance.alert);
|
||||
UIManager.Instance.alert.Set(title,msg);
|
||||
UIManager.Show(UIManager.Instance.alert, null, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIManager.Instance.alert.Show();
|
||||
UIManager.Instance.alert.SetText(msg);
|
||||
UIManager.Instance.alert.Set(title, msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user