I'm trying to get my inventory window to scroll, but whenever I click a scroll button, the cursor mode is rendered unchangable and I have to quit the game. Oh, and it doesn't work. Here's a diagram:
Displayed area is between *'s
*1 2 3 4 5* 6
I'm trying to change it to...
1 *2 3 4 5 6*
I use...
else if (button == 5) {
// scroll down
game.top_inv_item += 1;
}
else if (button == 4){
// scroll up
game.top_inv_item -= 1;
}
in the inventory script, but this code causes the problem to occur. Help!
This is what my code looks like. Maybe it can give you some ideas?
if ((button == 10) & (game.top_inv_item < game.num_inv_items - 7))
game.top_inv_item = game.top_inv_item + 4;
if ((button == 9) & (game.top_inv_item > 0))
game.top_inv_item = game.top_inv_item - 4;