2
0
Эх сурвалжийг харах

Merge pull request #343 from blackberry-gaming/next-dgough

Next dgough
Sean Paul Taylor 13 жил өмнө
parent
commit
b860bfc725

+ 10 - 1
gameplay/src/PlatformAndroid.cpp

@@ -4,6 +4,7 @@
 #include "Platform.h"
 #include "Platform.h"
 #include "FileSystem.h"
 #include "FileSystem.h"
 #include "Game.h"
 #include "Game.h"
+#include "Form.h"
 #include <unistd.h>
 #include <unistd.h>
 
 
 #include <android/sensor.h>
 #include <android/sensor.h>
@@ -549,7 +550,7 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
                     break;
                     break;
             }
             }
             size_t pointerId = AMotionEvent_getPointerId(event, i);
             size_t pointerId = AMotionEvent_getPointerId(event, i);
-            Game::getInstance()->touchEvent(touchEvent, AMotionEvent_getX(event, i), AMotionEvent_getY(event, i), pointerId);
+            gameplay::Platform::touchEventInternal(touchEvent, AMotionEvent_getX(event, i), AMotionEvent_getY(event, i), pointerId);
         }
         }
         return 1;
         return 1;
     } 
     } 
@@ -853,6 +854,14 @@ void Platform::displayKeyboard(bool display)
         __displayKeyboard = false;
         __displayKeyboard = false;
 }
 }
 
 
+void Platform::touchEventInternal(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex)
+{
+    if (!Form::touchEventInternal(evt, x, y, contactIndex))
+    {
+        Game::getInstance()->touchEvent(evt, x, y, contactIndex);
+    }
+}
+
 void Platform::sleep(long ms)
 void Platform::sleep(long ms)
 {
 {
     usleep(ms * 1000);
     usleep(ms * 1000);