Browse Source

fix keyup's case

master
Odilitime 5 years ago
parent
commit
0ec492332a
  1. 3
      src/graphics/components/Component.h

3
src/graphics/components/Component.h

@ -167,7 +167,8 @@ public: @@ -167,7 +167,8 @@ public:
std::function<void(int x, int y)> onMousemove = nullptr;
std::function<void(int x, int y)> onWheel = nullptr;
// https://www.quirksmode.org/dom/events/keys.html
std::function<void(int key, int scancode, int action, int mods)> onKeyup = nullptr;
// FIXME: there's only one action on a keyUp and that's keyRelease
std::function<void(int key, int scancode, int action, int mods)> onKeyUp = nullptr;
// "Fires when an actual character is being inserted in, for instance, a text input. It repeats while the user keeps the key depressed."
std::function<void(int key, int scancode, int action, int mods)> onKeyPress = nullptr;
std::function<void()> onClick = nullptr;

Loading…
Cancel
Save