I'm currently working on a simple inventory, when viewing the inventory I want to be able to cycle through the items by pressing a or d. I can scroll the items by doing something like if (key_d == 1) { weapon1_ent.y += 5* time_step; }
the above code just scrolls it along the y axis for as long as I hold d, I only want it to scroll a certain distance though instead of scrolling infinitely. I hope that made sense, and I hope someone can help.