|
@@ -188,9 +188,9 @@ namespace GFGGame
|
|
|
|
|
|
// if (_ui.m_comFavorites.m_comScroll.m_listRecommend.numItems > 0) _ui.m_comFavorites.m_comScroll.m_listRecommend.ScrollToView(0);
|
|
|
// if (_ui.m_comFavorites.m_comScroll.m_listRecommend1.numItems > 0) _ui.m_comFavorites.m_comScroll.m_listRecommend1.ScrollToView(0);
|
|
|
-
|
|
|
_ui.m_comNormal.m_comScroll.m_listRecommend.numItems = 0;
|
|
|
_ui.m_comNormal.m_comScroll.m_listRecommend1.numItems = 0;
|
|
|
+
|
|
|
_ui.m_comFavorites.m_comScroll.m_listRecommend.numItems = 0;
|
|
|
_ui.m_comFavorites.m_comScroll.m_listRecommend1.numItems = 0;
|
|
|
|
|
@@ -226,6 +226,7 @@ namespace GFGGame
|
|
|
ViewManager.Show<PoemGalleryRewardGetView>();
|
|
|
}
|
|
|
}
|
|
|
+ Timers.inst.AddUpdate(CheckGuide);
|
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
@@ -233,7 +234,7 @@ namespace GFGGame
|
|
|
base.OnHide();
|
|
|
ResetPullRelease();
|
|
|
_ui.m_comNormal.m_comBoBox.selectedIndex = 0;
|
|
|
-
|
|
|
+ Timers.inst.Remove(CheckGuide);
|
|
|
}
|
|
|
|
|
|
protected override void RemoveEventListener()
|
|
@@ -445,7 +446,14 @@ namespace GFGGame
|
|
|
{
|
|
|
if (_galleryDatas.Count % 2 == 0)
|
|
|
{
|
|
|
- _list.numItems = _galleryDatas.Count / 2;
|
|
|
+ if (GuideDataManager.IsGuideFinish(ConstGuideId.HUALANG_TOUGAO) <= 0)
|
|
|
+ {
|
|
|
+ _list.numItems = 1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _list.numItems = _galleryDatas.Count / 2;
|
|
|
+ }
|
|
|
_list1.numItems = _galleryDatas.Count / 2;
|
|
|
}
|
|
|
else
|
|
@@ -503,11 +511,15 @@ namespace GFGGame
|
|
|
private void RenderListItem(int index, GObject obj)
|
|
|
{
|
|
|
int num = index * 2;
|
|
|
- if (_galleryDatas.Count <= num)
|
|
|
+ long workId = 0;
|
|
|
+ if (GuideDataManager.IsGuideFinish(ConstGuideId.HUALANG_TOUGAO) > 0)
|
|
|
{
|
|
|
- return;
|
|
|
+ if (_galleryDatas.Count <= num)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ workId = _galleryDatas[num];
|
|
|
}
|
|
|
- long workId = _galleryDatas[num];
|
|
|
UpdateListItem(workId, obj);
|
|
|
}
|
|
|
|
|
@@ -527,32 +539,39 @@ namespace GFGGame
|
|
|
{
|
|
|
PoemGalleryData data = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
|
|
|
UI_ListItem item = UI_ListItem.Proxy(obj);
|
|
|
- item.m_c1.selectedIndex = 0;
|
|
|
- if (data.Ntexture == null) return;
|
|
|
- item.m_c1.selectedIndex = 1;
|
|
|
- item.m_loaIcon.texture = data.Ntexture;
|
|
|
- item.m_loaIcon.height = item.m_loaIcon.width * item.m_loaIcon.texture.height / item.m_loaIcon.texture.width;
|
|
|
- item.m_txtName.text = data.AuthorName;
|
|
|
- item.m_btnCollect.title = data.CollectCount.ToString();
|
|
|
- item.m_btnCollect.selected = data.CollectOrNot;
|
|
|
- item.m_btnVote.title = data.VoteCount.ToString();
|
|
|
- item.m_btnVote.selected = data.VoteOrNot;
|
|
|
-
|
|
|
- if (item.m_loaIcon.data == null)
|
|
|
+ if (GuideDataManager.IsGuideFinish(ConstGuideId.HUALANG_TOUGAO) <= 0)
|
|
|
{
|
|
|
- item.m_loaIcon.onClick.Add(OnLoaIconClick);
|
|
|
+ item.m_c1.selectedIndex = 1;
|
|
|
}
|
|
|
- item.m_loaIcon.data = workId;
|
|
|
- if (item.m_btnCollect.data == null)
|
|
|
- {
|
|
|
- item.m_btnCollect.onClick.Add(OnBtnCollectClick);
|
|
|
- }
|
|
|
- item.m_btnCollect.data = workId;
|
|
|
- if (item.m_btnVote.data == null)
|
|
|
+ else
|
|
|
{
|
|
|
- item.m_btnVote.onClick.Add(OnBtnVoteClick);
|
|
|
+ item.m_c1.selectedIndex = 0;
|
|
|
+ if (data.Ntexture == null) return;
|
|
|
+ item.m_c1.selectedIndex = 1;
|
|
|
+ item.m_loaIcon.texture = data.Ntexture;
|
|
|
+ item.m_loaIcon.height = item.m_loaIcon.width * item.m_loaIcon.texture.height / item.m_loaIcon.texture.width;
|
|
|
+ item.m_txtName.text = data.AuthorName;
|
|
|
+ item.m_btnCollect.title = data.CollectCount.ToString();
|
|
|
+ item.m_btnCollect.selected = data.CollectOrNot;
|
|
|
+ item.m_btnVote.title = data.VoteCount.ToString();
|
|
|
+ item.m_btnVote.selected = data.VoteOrNot;
|
|
|
+
|
|
|
+ if (item.m_loaIcon.data == null)
|
|
|
+ {
|
|
|
+ item.m_loaIcon.onClick.Add(OnLoaIconClick);
|
|
|
+ }
|
|
|
+ item.m_loaIcon.data = workId;
|
|
|
+ if (item.m_btnCollect.data == null)
|
|
|
+ {
|
|
|
+ item.m_btnCollect.onClick.Add(OnBtnCollectClick);
|
|
|
+ }
|
|
|
+ item.m_btnCollect.data = workId;
|
|
|
+ if (item.m_btnVote.data == null)
|
|
|
+ {
|
|
|
+ item.m_btnVote.onClick.Add(OnBtnVoteClick);
|
|
|
+ }
|
|
|
+ item.m_btnVote.data = workId;
|
|
|
}
|
|
|
- item.m_btnVote.data = workId;
|
|
|
UI_ListItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
@@ -561,6 +580,7 @@ namespace GFGGame
|
|
|
long workId = _galleryDatas[index];
|
|
|
PoemGalleryData data = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
|
|
|
UI_ListRankItem item = UI_ListRankItem.Proxy(obj);
|
|
|
+
|
|
|
if (data.Ntexture == null) return;
|
|
|
item.m_loaIcon.texture = data.Ntexture;
|
|
|
item.m_loaIcon.height = item.m_loaIcon.width * item.m_loaIcon.texture.height / item.m_loaIcon.texture.width;
|
|
@@ -801,5 +821,38 @@ namespace GFGGame
|
|
|
OnPullUpTimeComplete();
|
|
|
ViewManager.Hide<ModalStatusView>();
|
|
|
}
|
|
|
+
|
|
|
+ private void CheckGuide(object param)
|
|
|
+ {
|
|
|
+ if (GuideDataManager.IsGuideFinish(ConstGuideId.HUALANG_TOUGAO) <= 0)
|
|
|
+ {
|
|
|
+ UpdateCheckGuide(null);
|
|
|
+ _ui.m_guideBtn1.visible = true;
|
|
|
+ _ui.m_guideBtn2.visible = true;
|
|
|
+ _ui.m_guideBtn3.visible = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _ui.m_guideBtn3.visible = false;
|
|
|
+ _ui.m_guideBtn1.visible = false;
|
|
|
+ _ui.m_guideBtn2.visible = false;
|
|
|
+ Timers.inst.Remove(CheckGuide);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ protected void UpdateCheckGuide(object param)
|
|
|
+ {
|
|
|
+ if (!ViewManager.CheckIsTopView(this.viewCom)) return;
|
|
|
+ GuideController.TryGuide(_ui.m_guideBtn2, ConstGuideId.HUALANG_TOUGAO, 1, "点赞获得画廊积分可兑换多种拍照资源");
|
|
|
+ GuideController.TryGuide(_ui.m_guideBtn1, ConstGuideId.HUALANG_TOUGAO, 2, "收藏喜欢的作品");
|
|
|
+ GuideController.TryGuide(_ui.m_guideBtn3, ConstGuideId.HUALANG_TOUGAO, 3, "参与排行也可获得大量资源");
|
|
|
+ GuideController.TryGuide(_ui.m_btnJoin, ConstGuideId.HUALANG_TOUGAO, 4, "每周可进行两次投稿,快来积极投稿,让大家看见你的作品!");
|
|
|
+ }
|
|
|
+
|
|
|
+ protected override void TryCompleteGuide()
|
|
|
+ {
|
|
|
+ GuideController.TryCompleteGuideIndex(ConstGuideId.HUALANG_TOUGAO, 4);
|
|
|
+ GuideController.TryCompleteGuide(ConstGuideId.HUALANG_TOUGAO, 4);
|
|
|
+ }
|
|
|
}
|
|
|
}
|