------------------------------------------------------------------------------
| 1793 | |
| 1794 | //------------------------------------------------------------------------------ |
| 1795 | bool ActionMap::handleEvent(const InputEventInfo* pEvent) |
| 1796 | { |
| 1797 | // Interate through the ActionMapSet until we get a map that |
| 1798 | // handles the event or we run out of maps... |
| 1799 | // |
| 1800 | SimSet* pActionMapSet = Sim::getActiveActionMapSet(); |
| 1801 | AssertFatal(pActionMapSet && pActionMapSet->size() != 0, |
| 1802 | "error, no ActiveMapSet or no global action map..."); |
| 1803 | |
| 1804 | for (SimSet::iterator itr = pActionMapSet->end() - 1; |
| 1805 | itr > pActionMapSet->begin(); itr--) { |
| 1806 | ActionMap* pMap = static_cast<ActionMap*>(*itr); |
| 1807 | if (pMap->processAction(pEvent) == true) |
| 1808 | return true; |
| 1809 | } |
| 1810 | |
| 1811 | // Found no matching action. Try with the modifiers stripped. |
| 1812 | |
| 1813 | InputEventInfo eventNoModifiers = *pEvent; |
| 1814 | eventNoModifiers.modifier = ( InputModifiers ) 0; |
| 1815 | |
| 1816 | for (SimSet::iterator itr = pActionMapSet->end() - 1; |
| 1817 | itr > pActionMapSet->begin(); itr--) { |
| 1818 | ActionMap* pMap = static_cast<ActionMap*>(*itr); |
| 1819 | if( pMap->processAction( &eventNoModifiers ) ) |
| 1820 | return true; |
| 1821 | } |
| 1822 | |
| 1823 | return false; |
| 1824 | } |
| 1825 | |
| 1826 | //------------------------------------------------------------------------------ |
| 1827 | bool ActionMap::handleEventGlobal(const InputEventInfo* pEvent) |
nothing calls this directly
no test coverage detected