| 15 | } |
| 16 | |
| 17 | bool KeyBinding::isPressed() const { |
| 18 | // Modifiers are held down while non-modifier key is pressed once |
| 19 | return std::all_of(modifiers.begin(), modifiers.end(), [](const ImGuiKey &keyModifier){return (keyModifier != ImGuiKey_None) && ImGui::IsKeyDown(keyModifier);}) && (key != ImGuiKey_None) && ImGui::IsKeyPressed(key); |
| 20 | } |
| 21 | |
| 22 | ImGuiKey KeyBinding::getKey() const { |
| 23 | return key; |
no outgoing calls
no test coverage detected