Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <conio.h>
- #include <ctype.h>
- #include "windows.h"
- #include "kampf.h"
- using namespace std;
- int main(){
- int mpunkt = 0; // Menüpunkt, welcher grade anvisiert ist
- system("color F");
- cout << "Start\tOptionen\tBeenden"; // Beispielmenü
- bool exit = false;
- while(!exit)
- {
- if(kbhit())
- {
- char c = getch();
- switch(c)
- {
- case 75:
- mpunkt = mpunkt - 1;
- if(mpunkt<0)
- {
- mpunkt = 0;
- }
- break;
- case 77:
- mpunkt = mpunkt + 1;
- if(mpunkt>2)
- {
- mpunkt = 2;
- }
- break;
- }
- }
- Sleep(10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement