|
@@ -77,7 +77,7 @@ namespace GFGGame
|
|
|
ViewManager.GoBackFrom(typeof(PoemPhotoPreView).FullName);
|
|
|
|
|
|
}
|
|
|
- private void UpdateView()
|
|
|
+ private void UpdateView(bool ani = false)
|
|
|
{
|
|
|
_ui.m_btnLeft.enabled = _curIndex > 0;
|
|
|
_ui.m_btnRight.enabled = _curIndex < _ui.m_list.numItems - 1;
|
|
@@ -85,7 +85,7 @@ namespace GFGGame
|
|
|
_ui.m_btnLock.m_c1.selectedIndex = _photoInfos[_curIndex].LockingStatus ? 1 : 0;
|
|
|
_ui.m_btnUp.m_c1.selectedIndex = _photoInfos[_curIndex].ToppingStatus ? 1 : 0;
|
|
|
|
|
|
- if (_photoInfos.Count > 0) _ui.m_list.ScrollToView(_curIndex);
|
|
|
+ if (_photoInfos.Count > 0) _ui.m_list.ScrollToView(_curIndex, ani);
|
|
|
|
|
|
if (_ui.m_btnLock.target.data == null)
|
|
|
{
|
|
@@ -103,12 +103,10 @@ namespace GFGGame
|
|
|
private void RenderListItem(int index, GObject obj)
|
|
|
{
|
|
|
UI_ListPhotoPreviewItem item = UI_ListPhotoPreviewItem.Proxy(obj);
|
|
|
- GLoader loaIcon = item.m_comPhoto.m_loaPhoto;
|
|
|
- item.m_comPhoto.m_loaPhoto.texture = _photoInfos[index].Ntexture;// PoemPhotoDataManager.Instance.BytesToTexture2D(_photoInfos[index].Bytes);
|
|
|
+
|
|
|
+ item.m_comPhoto.m_loaPhoto.texture = _photoInfos[index].Ntexture;
|
|
|
item.target.SetSize(item.target.width, item.target.initHeight * _ui.target.height / _ui.target.initHeight);
|
|
|
- loaIcon.SetSize(loaIcon.width, loaIcon.texture.height * loaIcon.width / loaIcon.texture.width);
|
|
|
- loaIcon.y = item.target.height / 2;
|
|
|
- item.m_imgBorder.SetSize(item.target.width, item.target.height);
|
|
|
+
|
|
|
UI_ListPhotoPreviewItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
@@ -117,7 +115,7 @@ namespace GFGGame
|
|
|
_curIndex--;
|
|
|
_curIndex = Mathf.Max(0, _curIndex);
|
|
|
|
|
|
- UpdateView();
|
|
|
+ UpdateView(true);
|
|
|
}
|
|
|
|
|
|
private void OnBtnRightClick()
|
|
@@ -125,7 +123,7 @@ namespace GFGGame
|
|
|
_curIndex++;
|
|
|
_curIndex = Mathf.Min(_ui.m_list.numItems - 1, _curIndex);
|
|
|
|
|
|
- UpdateView();
|
|
|
+ UpdateView(true);
|
|
|
}
|
|
|
private void OnListScrollEnd()
|
|
|
{
|