Im trying to learn how to make a inventory based on loading .txt/.arc files and sofar so good, but when i want to place out the weapons that are available i dident know how to do it, so i checked forums but dident find so much about it.
I did check in to Stonehenge how they had done theirs but the prob is that they only have 1 row, with 4 items down like i show in attached file 1.
What im trying to do is to list the items like attached file 2.
What i have tryed to use/modify atm is this:
PHP Code:
if (this.curtab == NIL) this.curtab = "weapons";
this.gsk = getstringkeys("clientr." @ this.curtab @ "_");
for (temp.g = 0; temp.g < min(this.gsk.size(), 5); temp.g++)
{
// Draw the icons in the inventory that are currently visible
temp.draw = clientr.(@ this.curtab @ "_" @ this.gsk[temp.g + this.menuscroll])[3];
drawImg(502 + temp.g * 2, temp.draw, 31 + temp.g * 35, 110 + temp.g * 35, 6);
temp.writ = clientr.(@ this.curtab @ "_" @ this.gsk[temp.g + this.menuscroll])[1];
drawText(502 + temp.g * 2 + 1, 62, 131 + temp.g * 35, temp.font, "r", temp.writ, 7, .5, 1, 1, 1, 1);
if (mousescreenx in |31, 63|)
{
if (mousescreeny in |110 + temp.g * 35, 142 + temp.g * 35|)
{
// Hovering over an item in the inventory
temp.writ = clientr.(@ this.curtab @ "_" @ this.gsk[temp.g + this.menuscroll])[2];
drawText(500, mousescreenx, mousescreeny - 8, temp.font, "bc", temp.writ, 9, .5, 0, 0, 0, 1);
drawImg(501, "light4.png", -17, 62 + temp.g * 35, 8, .7, .7, .7, .7, .7);
}
}
}
How would i make it to list more then 1 row?