|
@@ -11,7 +11,8 @@ namespace GFGGame
|
|
|
{
|
|
|
private UI_LeagueTeaPartyUI _ui;
|
|
|
private List<TeapartyRoleCfg> teapartyRoleCfg;
|
|
|
-
|
|
|
+ private List<GObject> TeaPartyItemObj = new List<GObject>();
|
|
|
+
|
|
|
public override void Dispose()
|
|
|
{
|
|
|
if (_ui != null)
|
|
@@ -46,8 +47,8 @@ namespace GFGGame
|
|
|
|
|
|
private void ListTeaPartyItemRender(int index, GObject obj)
|
|
|
{
|
|
|
+ TeaPartyItemObj.Add(obj);
|
|
|
UI_comTeaPartyItem itemObj = UI_comTeaPartyItem.Proxy(obj);
|
|
|
- Vector2 localpos = obj.position;//.LocalToGlobal();
|
|
|
itemObj.m_btnDetail.data = index;
|
|
|
itemObj.m_btnDetail.onClick.Add(OnBtnDetailClick);
|
|
|
itemObj.m_iconRole.data = index;
|
|
@@ -157,7 +158,19 @@ namespace GFGGame
|
|
|
GObject obj = context.sender as GObject;
|
|
|
int index = (int)obj.data;
|
|
|
|
|
|
- //_ui.m_teaPartyItemTips.m_window.position = pos;
|
|
|
+ Vector2 pos = new Vector2();
|
|
|
+ if (index % 2 == 0) {
|
|
|
+ pos = _ui.m_ListTeaParty.LocalToGlobal(TeaPartyItemObj[index].position);
|
|
|
+ pos.x = pos.x + TeaPartyItemObj[index].width;
|
|
|
+ pos.y = pos.y + TeaPartyItemObj[index].height / 2;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ pos = _ui.m_ListTeaParty.LocalToGlobal(TeaPartyItemObj[index].position);
|
|
|
+ pos.x = pos.x - TeaPartyItemObj[index].width;
|
|
|
+ pos.y = pos.y + TeaPartyItemObj[index].height / 2;
|
|
|
+ }
|
|
|
+
|
|
|
+ _ui.m_teaPartyItemTips.m_window.position = pos;
|
|
|
|
|
|
_ui.m_teaPartyItemTips.target.visible = true;
|
|
|
_ui.m_teaPartyItemTips.m_txtName.text = teapartyRoleCfg[index].name;
|