void Form::gamepadEventInternal(Gamepad::GamepadEvent evt, Gamepad* gamepad, unsigned int analogIndex) { for (size_t i = 0; i < __forms.size(); ++i) { Form* form = __forms[i]; GP_ASSERT(form); if (form->isEnabled() && form->isVisible() && form->hasFocus()) { if (form->gamepadEvent(evt, gamepad, analogIndex)) return; } } }
bool Form::keyEventInternal(Keyboard::KeyEvent evt, int key) { size_t size = __forms.size(); for (size_t i = 0; i < size; ++i) { Form* form = __forms[i]; GP_ASSERT(form); if (form->isEnabled() && form->isVisible() && form->hasFocus() && !form->_isGamepad) { if (form->keyEvent(evt, key)) return true; } } return false; }