- Home /
GUI.Window write elements by pages
Hi there!
I have GUI.Window which shows list items. I have certain list that contains 34 elements. I Need to show eight elements per window... So if i use loop it checks:
for (int i = 0; i < mageSkills.Count; i++)
{
GUI.Label(new Rect(5, 20 + i * 35, 100, 30), mageSkills[i]);
if (i % 8 == 0)
{
if (GUI.Button(new Rect(190, 305, 30, 20), ">"))
{
//THIS SHOULD SHOW NEXT 8 ITEMS
}
}
}
Please, help me to make this window to show 8 elements of list with a functions of going to next> and going previous 8 elements<
Comment