Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
PD
unregistriert
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
if(input.wasKeyboardKeyPressed(DIK_A)) c = 'a'; else if(input.wasKeyboardKeyPressed(DIK_B)) c = 'b'; else if(input.wasKeyboardKeyPressed(DIK_C)) c = 'c'; else if(input.wasKeyboardKeyPressed(DIK_D)) c = 'd'; else if(input.wasKeyboardKeyPressed(DIK_E)) c = 'e'; else if(input.wasKeyboardKeyPressed(DIK_F)) c = 'f'; else if(input.wasKeyboardKeyPressed(DIK_G)) c = 'g'; else if(input.wasKeyboardKeyPressed(DIK_H)) c = 'h'; else if(input.wasKeyboardKeyPressed(DIK_I)) c = 'i'; else if(input.wasKeyboardKeyPressed(DIK_J)) c = 'j'; else if(input.wasKeyboardKeyPressed(DIK_K)) c = 'k'; else if(input.wasKeyboardKeyPressed(DIK_L)) c = 'l'; else if(input.wasKeyboardKeyPressed(DIK_M)) c = 'm'; else if(input.wasKeyboardKeyPressed(DIK_N)) c = 'n'; else if(input.wasKeyboardKeyPressed(DIK_O)) c = 'o'; else if(input.wasKeyboardKeyPressed(DIK_P)) c = 'p'; else if(input.wasKeyboardKeyPressed(DIK_Q)) c = 'q'; else if(input.wasKeyboardKeyPressed(DIK_R)) c = 'r'; else if(input.wasKeyboardKeyPressed(DIK_S)) c = 's'; else if(input.wasKeyboardKeyPressed(DIK_T)) c = 't'; else if(input.wasKeyboardKeyPressed(DIK_U)) c = 'u'; else if(input.wasKeyboardKeyPressed(DIK_V)) c = 'v'; else if(input.wasKeyboardKeyPressed(DIK_W)) c = 'w'; else if(input.wasKeyboardKeyPressed(DIK_X)) c = 'x'; else if(input.wasKeyboardKeyPressed(DIK_Y)) c = 'y'; else if(input.wasKeyboardKeyPressed(DIK_Z)) c = 'z'; else if(input.wasKeyboardKeyPressed(DIK_SPACE)) c = ' '; else if(input.wasKeyboardKeyPressed(DIK_BACK)) c = '\b'; else c = 0; switch(c) { case '\b': if(!text.empty()) text.resize(text.size()-1); break; default: if(input.isKeyboardKeyDown(DIK_LSHIFT) || input.isKeyboardKeyDown(DIK_RSHIFT)) c -= 32; if(c > 0) text += string(1, c); break; } |
naja das DIK steht soweit ich weiß für DirectInputKey und die TBs kommen von Davids TriBase...Zitat von »"Black-Panther"«
Hmmm... eine Frage: Wieso verwendest du die DIK-Konstanten... Hat die DirectInput-Klasse nicht eigene Makros... TB_KEY_A - TB_KEY_Z oder?
PD
unregistriert
PD
unregistriert
Werbeanzeige