dmuratshin 9 years ago
parent
commit
4e6b5cfd94

+ 4 - 4
oxygine/src/Actor.cpp

@@ -288,7 +288,7 @@ namespace oxygine
         _pressed = 0;
         _pressed = 0;
         _getStage()->removeEventListener(TouchEvent::TOUCH_UP, CLOSURE(this, &Actor::_onGlobalTouchUpEvent));
         _getStage()->removeEventListener(TouchEvent::TOUCH_UP, CLOSURE(this, &Actor::_onGlobalTouchUpEvent));
 
 
-        updateState();
+        updateStatePressed();
     }
     }
 
 
     void Actor::_onGlobalTouchUpEvent(Event* ev)
     void Actor::_onGlobalTouchUpEvent(Event* ev)
@@ -323,7 +323,7 @@ namespace oxygine
         up.localPosition = convert_stage2local(this, te->localPosition, _getStage());
         up.localPosition = convert_stage2local(this, te->localPosition, _getStage());
         dispatchEvent(&up);
         dispatchEvent(&up);
 
 
-        updateState();
+        updateStateOvered();
     }
     }
 
 
     void Actor::dispatchEvent(Event* event)
     void Actor::dispatchEvent(Event* event)
@@ -334,7 +334,7 @@ namespace oxygine
             if (!_overred)
             if (!_overred)
             {
             {
                 _overred = te->index;
                 _overred = te->index;
-                updateState();
+                updateStateOvered();
 
 
                 TouchEvent over = *te;
                 TouchEvent over = *te;
                 over.type = TouchEvent::OVER;
                 over.type = TouchEvent::OVER;
@@ -353,7 +353,7 @@ namespace oxygine
                 _pressed = te->index;
                 _pressed = te->index;
                 _getStage()->addEventListener(TouchEvent::TOUCH_UP, CLOSURE(this, &Actor::_onGlobalTouchUpEvent));
                 _getStage()->addEventListener(TouchEvent::TOUCH_UP, CLOSURE(this, &Actor::_onGlobalTouchUpEvent));
 
 
-                updateState();
+                updateStatePressed();
             }
             }
         }
         }
 
 

+ 2 - 1
oxygine/src/Actor.h

@@ -247,7 +247,8 @@ namespace oxygine
         /**Dispatches an event into the event flow. The event target is the EventDispatcher object upon which the dispatchEvent() method is called.*/
         /**Dispatches an event into the event flow. The event target is the EventDispatcher object upon which the dispatchEvent() method is called.*/
         void dispatchEvent(Event* event);
         void dispatchEvent(Event* event);
 
 
-        virtual void updateState() {}
+        virtual void updateStateOvered() {}
+        virtual void updateStatePressed() {}
 
 
         spTween addTween(spTween);
         spTween addTween(spTween);
         spTween addTween2(spTween, const TweenOptions& opt);
         spTween addTween2(spTween, const TweenOptions& opt);

+ 2 - 2
oxygine/src/core/android/jniUtils.cpp

@@ -1,7 +1,7 @@
 #include "jniUtils.h"
 #include "jniUtils.h"
 #include "jniHelper.h"
 #include "jniHelper.h"
 #include "core/log.h"
 #include "core/log.h"
-#include "core/ThreadMessages.h"
+#include "core/ThreadDispatcher.h"
 
 
 using namespace oxygine;
 using namespace oxygine;
 
 
@@ -235,6 +235,6 @@ extern "C"
     JNIEXPORT void JNICALL Java_org_oxygine_lib_Utils_runOnGameThread
     JNIEXPORT void JNICALL Java_org_oxygine_lib_Utils_runOnGameThread
     (JNIEnv* env, jclass clazz, jobject object)
     (JNIEnv* env, jclass clazz, jobject object)
     {
     {
-        core::getMainThreadMessages().postCallback(0, env->NewGlobalRef(object), 0, runTask, 0);
+        core::getMainThreadDispatcher().postCallback(0, env->NewGlobalRef(object), 0, runTask, 0);
     }
     }
 }
 }

+ 1 - 1
oxygine/src/res/ResAtlasGeneric.cpp

@@ -189,7 +189,7 @@ namespace oxygine
         ad.atlas.init(w, h);
         ad.atlas.init(w, h);
 
 
 
 
-        if (_atlasses.size() > _current)
+        if ((int)_atlasses.size() > _current)
             ad.texture = _atlasses[_current].base;
             ad.texture = _atlasses[_current].base;
         else
         else
         {
         {