加确认框。按钮加tooltips。调整大地图tips的位置。

This commit is contained in:
suntao committed 2021-04-21 11:25:52 +08:00
1 parent bb4fabc833
commit 1c712ff7d5
18 files changed
+2401 -520

No files matched your search

@@ -30,7 +30,23 @@ public class BigMapController : PFUIPanel
UnityEngine.Object begin;
Sprite end;
private Dictionary<int, LineItem> linesCache = new Dictionary<int, LineItem>();
Tips tips;
UnityEngine.Object tipsObject;
private Tips _tips;
private Tips tips
{
get
{
if (_tips == null)
{
_tips = ((GameObject)Instantiate(tipsObject, canvas.transform.Find("TipsContainer"))).GetComponent<Tips>();
}
return _tips;
}
set
{
_tips = value;
}
}
int timer = 0;
protected override void Awake()
{
@@ -76,8 +92,9 @@ public class BigMapController : PFUIPanel
var searchBtn = input.Find("Search").gameObject;
UIManager.AddEvent(searchBtn, EventTriggerType.PointerClick, Search);
tips = ((GameObject)Instantiate(Resources.Load("UI/Prefab/BigMap/Tips"), canvas.transform.Find("TipsContainer"))).GetComponent<Tips>();
tips.Hide();
tipsObject = Resources.Load("UI/Prefab/BigMap/Tips");
//tips = ((GameObject)Instantiate(tipsObject, canvas.transform.Find("TipsContainer"))).GetComponent<Tips>();
//tips.Hide();
BindHeadImage();
}
@@ -228,6 +245,7 @@ public class BigMapController : PFUIPanel
if(item.Value.Selected)
{
tips.Hide();
tips = null;
}
}
}
@@ -289,11 +307,16 @@ public class BigMapController : PFUIPanel
line.Item = iii;
iii.onClick = () =>
{
if(tips != null)
{
tips.Hide();
tips = null;
}
if (line.Selected)
{
line.Selected = false;
tips.Hide();
//iii.Selected(false);
//tips.Hide();
//tips = null;
return;
}
line.Selected = true;
@@ -360,7 +383,8 @@ public class BigMapController : PFUIPanel
line.Selected = true;
var position = line.BeginMarker.transform.position;
//position.z += 25;
tips.Show(position, line.Model);
//tips.Show(position, line.Model);
tips.Move(position);
}
}
/// <summary>
@@ -1,6 +1,7 @@
using Assets.Scripts;
using Assets.Scripts.Apis;
using Assets.Scripts.Apis.Models;
using Assets.Scripts.UI.Control;
using DG.Tweening;
using System;
using System.Collections;
@@ -57,10 +58,11 @@ public class HomeController : PFUIPanel
{
UIManager.ShowUserInfoPanel();
});
userInfo.Find("BtnMore").GetComponent<PfUIButton>().SetEnabled(false);
UIManager.AddEvent(userInfo.Find("BtnMore").gameObject, EventTriggerType.PointerClick, x =>
{
UIManager.ShowAlert("test");
//UIManager.ShowConfirm("Quit", "Do you want to quit PowerFun?", null);
});
GetSummary();
}
@@ -156,7 +158,6 @@ public class HomeController : PFUIPanel
cg.alpha = 0;
base.Show();
cg.DOFade(1f, 0.3f);
cg.DOFade(1f, 0.3f);
}
}