bool UINode::onKeyPress (int32_t key, int16_t modifier) { for (UINodeListConstIter i = _nodes.begin(); i != _nodes.end(); ++i) { UINode* nodePtr = *i; if (!nodePtr->isVisible()) continue; if (nodePtr->onKeyPress(key, modifier)) return true; } return false; }
bool UINode::onKeyRelease (int32_t key) { for (UINodeListConstIter i = _nodes.begin(); i != _nodes.end(); ++i) { UINode* nodePtr = *i; if (!nodePtr->isVisible()) continue; if (nodePtr->onKeyRelease(key)) return true; } return false; }
bool UINode::onFingerPress (int64_t finger, uint16_t x, uint16_t y) { initDrag(x, y); for (UINodeListRevIter i = _nodes.rbegin(); i != _nodes.rend(); ++i) { UINode* nodePtr = *i; if (!nodePtr->isVisible()) continue; if (!nodePtr->checkBounds(x - getRenderX(), y - getRenderY())) continue; if (nodePtr->onFingerPress(finger, x - getRenderX(), y - getRenderY())) return true; } return false; }