------------------------------------------------------------------------------
| 1656 | |
| 1657 | //------------------------------------------------------------------------------ |
| 1658 | bool ActionMap::handleEvent(const InputEventInfo* pEvent) |
| 1659 | { |
| 1660 | // Interate through the ActionMapSet until we get a map that |
| 1661 | // handles the event or we run out of maps... |
| 1662 | // |
| 1663 | SimSet* pActionMapSet = Sim::getActiveActionMapSet(); |
| 1664 | AssertFatal(pActionMapSet && pActionMapSet->size() != 0, |
| 1665 | "error, no ActiveMapSet or no global action map..."); |
| 1666 | |
| 1667 | for (SimSet::iterator itr = pActionMapSet->end() - 1; |
| 1668 | itr > pActionMapSet->begin(); itr--) { |
| 1669 | ActionMap* pMap = static_cast<ActionMap*>(*itr); |
| 1670 | if (pMap->processAction(pEvent) == true) |
| 1671 | return true; |
| 1672 | } |
| 1673 | |
| 1674 | // Found no matching action. Try with the modifiers stripped. |
| 1675 | |
| 1676 | InputEventInfo eventNoModifiers = *pEvent; |
| 1677 | eventNoModifiers.modifier = ( InputModifiers ) 0; |
| 1678 | |
| 1679 | for (SimSet::iterator itr = pActionMapSet->end() - 1; |
| 1680 | itr > pActionMapSet->begin(); itr--) { |
| 1681 | ActionMap* pMap = static_cast<ActionMap*>(*itr); |
| 1682 | if( pMap->processAction( &eventNoModifiers ) ) |
| 1683 | return true; |
| 1684 | } |
| 1685 | |
| 1686 | return false; |
| 1687 | } |
| 1688 | |
| 1689 | //------------------------------------------------------------------------------ |
| 1690 | bool ActionMap::handleEventGlobal(const InputEventInfo* pEvent) |
nothing calls this directly
no test coverage detected