|
@@ -308,12 +308,13 @@ namespace GFGGame
|
|
{
|
|
{
|
|
if (_ui.m_list.GetChildAt(i).visible == true) count++;
|
|
if (_ui.m_list.GetChildAt(i).visible == true) count++;
|
|
}
|
|
}
|
|
- float height = count * (97 + 20);
|
|
|
|
|
|
+ int oneItemHeight = 97 + _ui.m_list.lineGap;
|
|
|
|
+ float height = count * oneItemHeight;
|
|
if (_ui.m_btnChange.target.selected == true)
|
|
if (_ui.m_btnChange.target.selected == true)
|
|
{
|
|
{
|
|
_ui.m_btnChange.m_c1.selectedIndex = 1;
|
|
_ui.m_btnChange.m_c1.selectedIndex = 1;
|
|
|
|
|
|
- GTween.To(0, height, 0.4f).SetTarget(_ui.m_list)
|
|
|
|
|
|
+ GTween.To(_ui.m_list.height, height, 0.4f).SetTarget(_ui.m_list)
|
|
.OnUpdate((GTweener t) =>
|
|
.OnUpdate((GTweener t) =>
|
|
{
|
|
{
|
|
_ui.m_list.height = t.value.x;
|
|
_ui.m_list.height = t.value.x;
|
|
@@ -325,7 +326,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
_ui.m_btnChange.m_c1.selectedIndex = 0;
|
|
_ui.m_btnChange.m_c1.selectedIndex = 0;
|
|
|
|
|
|
- GTween.To(height, 0, 0.4f).SetTarget(_ui.m_list)
|
|
|
|
|
|
+ GTween.To(_ui.m_list.height, oneItemHeight, 0.4f).SetTarget(_ui.m_list)
|
|
.OnUpdate((GTweener t) =>
|
|
.OnUpdate((GTweener t) =>
|
|
{
|
|
{
|
|
_ui.m_list.height = t.value.x;
|
|
_ui.m_list.height = t.value.x;
|