|
@@ -30,6 +30,7 @@ namespace GFGGame
|
|
|
private int _rarityIndex = SORT_BY_HIGH_RARITY;
|
|
|
|
|
|
private UI_TypeItem listTypeItem_FreedomDress;
|
|
|
+ private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
|
|
|
|
|
|
public override void Dispose()
|
|
|
{
|
|
@@ -38,7 +39,11 @@ namespace GFGGame
|
|
|
GameObject.Destroy(_sceneObject);
|
|
|
_sceneObject = null;
|
|
|
}
|
|
|
-
|
|
|
+ for (int i = 0; i < _listLongPress.Count; i++)
|
|
|
+ {
|
|
|
+ _listLongPress[i].Dispose();
|
|
|
+ }
|
|
|
+ _listLongPress.Clear();
|
|
|
if (_ui != null)
|
|
|
{
|
|
|
_ui.Dispose();
|
|
@@ -213,6 +218,10 @@ namespace GFGGame
|
|
|
|
|
|
private void OnClickPartsListItem(EventContext context)
|
|
|
{
|
|
|
+ if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
GObject listItem = (GObject)context.data as GObject;
|
|
|
int id = (int)listItem.data;
|
|
|
if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
|
|
@@ -231,8 +240,13 @@ namespace GFGGame
|
|
|
UpdateListSuitPartsSelected();
|
|
|
|
|
|
}
|
|
|
+
|
|
|
private void OnClickSuitPartsListItem(EventContext context)
|
|
|
{
|
|
|
+ if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
GObject listItem = (GObject)context.data as GObject;
|
|
|
int id = (int)listItem.data;
|
|
|
|
|
@@ -242,6 +256,12 @@ namespace GFGGame
|
|
|
UpdateListSuitPartsSelected();
|
|
|
UpdateBtnAction();
|
|
|
}
|
|
|
+ private void OnLongPress(EventContext context)
|
|
|
+ {
|
|
|
+ LongPressGesture gesture = (LongPressGesture)context.sender;
|
|
|
+ int itemId = (int)gesture.host.data;
|
|
|
+ GoodsItemTipsController.ShowItemTips(itemId);
|
|
|
+ }
|
|
|
private void OnTouchPad()
|
|
|
{
|
|
|
if (this.currentListType == DressUpListType.List4)
|
|
@@ -531,12 +551,20 @@ namespace GFGGame
|
|
|
listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + mainScore);
|
|
|
|
|
|
}
|
|
|
+ if (listItem.target.data == null)
|
|
|
+ {
|
|
|
+ LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
|
|
|
+ longPressGesture.once = true;
|
|
|
+ longPressGesture.onAction.Add(OnLongPress);
|
|
|
+ _listLongPress.Add(longPressGesture);
|
|
|
+ }
|
|
|
listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
|
|
|
listItem.m_txtTitle.text = partName;
|
|
|
listItem.target.data = id;
|
|
|
listItem.m_txtScore.visible = false;
|
|
|
//listItem.m_ScoreType.visible = true;
|
|
|
listItem.m_imgNeed.visible = false;
|
|
|
+
|
|
|
UI_PartsListItem.ProxyEnd();
|
|
|
|
|
|
|
|
@@ -550,6 +578,14 @@ namespace GFGGame
|
|
|
string partName = "";
|
|
|
string ext = "png";
|
|
|
|
|
|
+ if (listItem.target.data == null)
|
|
|
+ {
|
|
|
+ LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
|
|
|
+ longPressGesture.once = true;
|
|
|
+ longPressGesture.onAction.Add(OnLongPress);
|
|
|
+ _listLongPress.Add(longPressGesture);
|
|
|
+ }
|
|
|
+
|
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
|
|
|
iconRes = itemCfg.res;
|
|
|
partName = itemCfg.name;
|
|
@@ -562,9 +598,8 @@ namespace GFGGame
|
|
|
int mainScore;
|
|
|
int mainValuel;
|
|
|
ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
|
|
|
- listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + mainScore);
|
|
|
-
|
|
|
|
|
|
+ listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + mainScore);
|
|
|
listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
|
|
|
listItem.m_txtTitle.text = partName;
|
|
|
listItem.target.data = id;
|