MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / GUI_Input_CheckKey

Method GUI_Input_CheckKey

Source/GUI_Element.cpp:1310–1337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1308}
1309
1310void cFodder::GUI_Input_CheckKey() {
1311
1312 if (mKeyCode != mInput_LastKey) {
1313 mInput_LastKey = mKeyCode;
1314
1315 if (!(mInput_LastKey & 0x80)) {
1316
1317 if (mKeyCode >= SDL_SCANCODE_A && mKeyCode <= SDL_SCANCODE_Z)
1318 mKeyCodeAscii = 'A' + (mKeyCode - 4);
1319
1320 if (mKeyCode >= SDL_SCANCODE_1 && mKeyCode <= SDL_SCANCODE_9)
1321 mKeyCodeAscii = '1' + (mKeyCode - 30);
1322
1323 if (mKeyCode == SDL_SCANCODE_0)
1324 mKeyCodeAscii = '0';
1325
1326 if (mKeyCode == SDL_SCANCODE_RETURN)
1327 mKeyCodeAscii = 0x0D;
1328
1329 if (mKeyCode == SDL_SCANCODE_BACKSPACE)
1330 mKeyCodeAscii = 8;
1331
1332 return;
1333 }
1334 }
1335
1336 mKeyCodeAscii = 0;
1337}
1338
1339
1340void cFodder::GUI_Button_Load_MouseWheel() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected