Arrows in Dev?
I am writing a RPG game as most of you will know. See my sig. IN it, you have to use letters or the numpad to navigate, and i think that making the arrow keys available to navigate would be helpful. Can anyone tell me how to do this in Dev? (which has no kbhit())? Thanks in advance!
I haven't used console in Dev-C++ in so long I couldn't tell you. I found a way to do it, I just don't remember. I guess I'm just hooked to Allegro's keyboard handler.
Better move from Dev to VC++, it's much better :)
It is not too hard, just use getch or getc or whatever it is, and hit an arrow key and display what was inputed to the screen, do this for all the arrows. Then you know what the hex code for that key is, so you just use getc or getch and test to see if the input is that number. Umm, it makes sense to me, I would code an example, but I am tired.
Actually there is kbhit(); it's under the header of conio.c. But you can always use getch() anyways, so it's not that big of a deal. www.asciitable.com will be of some help to you probably.
well, you know that you can use windows.h in a windows console, which is what dev makes.
VK_RIGHT == right arrow key
//code code code.....
cout << "Pooopies";
VK_LEFT == left arrow key
VK_DOWN == i think you get the point!