we want these to only be called once per frame!!
| 831 | |
| 832 | //we want these to only be called once per frame!! |
| 833 | bool createMouseMoveEvent( S32 touchNumber, S32 x, S32 y, S32 lastX, S32 lastY ) //EFM |
| 834 | { |
| 835 | S32 currentSlot = -1; |
| 836 | |
| 837 | if (Canvas == NULL) |
| 838 | return false; |
| 839 | |
| 840 | for( int i = 0 ; (i < MAX_TOUCH_EVENTS) && (currentSlot == -1) ; i++ ) |
| 841 | { |
| 842 | if( (lastX == lastTouches[i].lastX ) && |
| 843 | (lastY == lastTouches[i].lastY ) ) |
| 844 | { |
| 845 | currentSlot = i; |
| 846 | } |
| 847 | } |
| 848 | |
| 849 | if( currentSlot == -1 ) return false; |
| 850 | |
| 851 | ScreenTouchEvent event; |
| 852 | event.xPos = x; |
| 853 | event.yPos = y; |
| 854 | event.action = SI_MOVE; |
| 855 | event.touchID = currentSlot; |
| 856 | event.numTouches = 0; |
| 857 | |
| 858 | //Luma: Mouse not moving (no hover for mouse fingers!) |
| 859 | Canvas->setCursorPos( Point2I( x, y ) ); |
| 860 | |
| 861 | if( currentSlot != -1 ) |
| 862 | { |
| 863 | lastTouches[currentSlot].lastX = x; |
| 864 | lastTouches[currentSlot].lastY = y; |
| 865 | } |
| 866 | |
| 867 | TouchMoveEvents.push_back( touchEvent( currentSlot, x, y ) ); |
| 868 | Game->postEvent(event); |
| 869 | |
| 870 | return true;//return false if we get bad values or something |
| 871 | } |
| 872 | |
| 873 | |
| 874 | bool createMouseDownEvent( S32 touchNumber, S32 x, S32 y, U32 numTouches ) |
no test coverage detected