Improved function GetKeyPressed()
To support multiple keys (including function keys)
This commit is contained in:
parent
d0e7195a16
commit
6ee5718b2e
2 changed files with 15 additions and 11 deletions
|
@ -1735,10 +1735,11 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
|
|||
TakeScreenshot();
|
||||
}
|
||||
#endif
|
||||
else currentKeyState[key] = action;
|
||||
|
||||
// TODO: Review (and remove) this HACK for GuiTextBox, to deteck back key
|
||||
if ((key == 259) && (action == GLFW_PRESS)) lastKeyPressed = 3;
|
||||
else
|
||||
{
|
||||
currentKeyState[key] = action;
|
||||
if (action == GLFW_PRESS) lastKeyPressed = key;
|
||||
}
|
||||
}
|
||||
|
||||
// GLFW3 Mouse Button Callback, runs on mouse button pressed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue