Commit 80bf187a authored by mercury233's avatar mercury233

part fix popup list (select banlist)

parent 5bd85214
......@@ -202,6 +202,7 @@ public class UIPopupList : UIWidgetContainer
[System.NonSerialized] protected GameObject mSelection;
[System.NonSerialized] protected int mOpenFrame = 0;
[System.NonSerialized] protected float mInitialY = 0f;
// Deprecated functionality
[HideInInspector][SerializeField] GameObject eventReceiver;
......@@ -1095,6 +1096,7 @@ public class UIPopupList : UIWidgetContainer
pos.x = Mathf.Round(pos.x);
pos.y = Mathf.Round(pos.y);
t.localPosition = pos;
mInitialY = pos.y;
}
else OnSelect(false);
if (mChild != null)
......@@ -1138,7 +1140,8 @@ public class UIPopupList : UIWidgetContainer
}
else
{
float whole = items.Count * 20;
//float labelHeight = activeFontSize * activeFontScale;
//float whole = (labelHeight + padding.y) * items.Count + mBgBorder;
float l=delta *100f;
if (go.layer == Program.I().ui_windows_2d.layer)
{
......@@ -1172,9 +1175,9 @@ public class UIPopupList : UIWidgetContainer
a.y += l;
a.z = 0;
timeScroller = Program.TimePassed();
if (a.y > whole)
if (a.y > mInitialY)
{
a.y = whole;
a.y = mInitialY;
}
if (a.y < 0)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment