mirror of https://github.com/axmolengine/axmol.git
fix compiling errors
This commit is contained in:
parent
4c9771ba3c
commit
2549804dec
|
@ -106,38 +106,38 @@ static void executeJSFunctionFromReservedSpot(JSContext *cx, JSObject *obj,
|
|||
}
|
||||
}
|
||||
|
||||
static void getTouchesFuncName(TouchEvent::EventCode eventCode, std::string &funcName)
|
||||
static void getTouchesFuncName(EventTouch::EventCode eventCode, std::string &funcName)
|
||||
{
|
||||
switch(eventCode)
|
||||
{
|
||||
case TouchEvent::EventCode::BEGAN:
|
||||
case EventTouch::EventCode::BEGAN:
|
||||
funcName = "onTouchesBegan";
|
||||
break;
|
||||
case TouchEvent::EventCode::ENDED:
|
||||
case EventTouch::EventCode::ENDED:
|
||||
funcName = "onTouchesEnded";
|
||||
break;
|
||||
case TouchEvent::EventCode::MOVED:
|
||||
case EventTouch::EventCode::MOVED:
|
||||
funcName = "onTouchesMoved";
|
||||
break;
|
||||
case TouchEvent::EventCode::CANCELLED:
|
||||
case EventTouch::EventCode::CANCELLED:
|
||||
funcName = "onTouchesCancelled";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void getTouchFuncName(TouchEvent::EventCode eventCode, std::string &funcName)
|
||||
static void getTouchFuncName(EventTouch::EventCode eventCode, std::string &funcName)
|
||||
{
|
||||
switch(eventCode) {
|
||||
case TouchEvent::EventCode::BEGAN:
|
||||
case EventTouch::EventCode::BEGAN:
|
||||
funcName = "onTouchBegan";
|
||||
break;
|
||||
case TouchEvent::EventCode::ENDED:
|
||||
case EventTouch::EventCode::ENDED:
|
||||
funcName = "onTouchEnded";
|
||||
break;
|
||||
case TouchEvent::EventCode::MOVED:
|
||||
case EventTouch::EventCode::MOVED:
|
||||
funcName = "onTouchMoved";
|
||||
break;
|
||||
case TouchEvent::EventCode::CANCELLED:
|
||||
case EventTouch::EventCode::CANCELLED:
|
||||
funcName = "onTouchCancelled";
|
||||
break;
|
||||
}
|
||||
|
@ -839,7 +839,7 @@ int ScriptingCore::handleTouchesEvent(void* data)
|
|||
return 0;
|
||||
|
||||
Layer* pLayer = static_cast<Layer*>(touchesScriptData->nativeObject);
|
||||
TouchEvent::EventCode eventType = touchesScriptData->actionType;
|
||||
EventTouch::EventCode eventType = touchesScriptData->actionType;
|
||||
const std::vector<Touch*>& touches = touchesScriptData->touches;
|
||||
|
||||
std::string funcName = "";
|
||||
|
@ -884,7 +884,7 @@ int ScriptingCore::handleTouchEvent(void* data)
|
|||
return 0;
|
||||
|
||||
Layer* pLayer = static_cast<Layer*>(touchScriptData->nativeObject);
|
||||
TouchEvent::EventCode eventType = touchScriptData->actionType;
|
||||
EventTouch::EventCode eventType = touchScriptData->actionType;
|
||||
Touch *pTouch = touchScriptData->touch;
|
||||
|
||||
|
||||
|
@ -980,7 +980,7 @@ int ScriptingCore::handleKeypadEvent(void* data)
|
|||
if (NULL == keypadScriptData->nativeObject)
|
||||
return 0;
|
||||
|
||||
KeyboardEvent::KeyCode action = keypadScriptData->actionType;
|
||||
EventKeyboard::KeyCode action = keypadScriptData->actionType;
|
||||
|
||||
js_proxy_t * p = jsb_get_native_proxy(keypadScriptData->nativeObject);
|
||||
|
||||
|
@ -989,7 +989,7 @@ int ScriptingCore::handleKeypadEvent(void* data)
|
|||
JSBool ret = JS_FALSE;
|
||||
switch(action)
|
||||
{
|
||||
case KeyboardEvent::KeyCode::KEY_BACKSPACE:
|
||||
case EventKeyboard::KeyCode::KEY_BACKSPACE:
|
||||
ret = executeFunctionWithOwner(OBJECT_TO_JSVAL(p->obj), "onBackClicked");
|
||||
if (!ret)
|
||||
{
|
||||
|
@ -1000,7 +1000,7 @@ int ScriptingCore::handleKeypadEvent(void* data)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case KeyboardEvent::KeyCode::KEY_MENU:
|
||||
case EventKeyboard::KeyCode::KEY_MENU:
|
||||
ret = executeFunctionWithOwner(OBJECT_TO_JSVAL(p->obj), "onMenuClicked");
|
||||
if (!ret)
|
||||
{
|
||||
|
@ -1021,7 +1021,7 @@ int ScriptingCore::handleKeypadEvent(void* data)
|
|||
}
|
||||
|
||||
|
||||
int ScriptingCore::executeCustomTouchesEvent(TouchEvent::EventCode eventType,
|
||||
int ScriptingCore::executeCustomTouchesEvent(EventTouch::EventCode eventType,
|
||||
const std::vector<Touch*>& touches, JSObject *obj)
|
||||
{
|
||||
jsval retval;
|
||||
|
@ -1055,7 +1055,7 @@ int ScriptingCore::executeCustomTouchesEvent(TouchEvent::EventCode eventType,
|
|||
}
|
||||
|
||||
|
||||
int ScriptingCore::executeCustomTouchEvent(TouchEvent::EventCode eventType,
|
||||
int ScriptingCore::executeCustomTouchEvent(EventTouch::EventCode eventType,
|
||||
Touch *pTouch, JSObject *obj)
|
||||
{
|
||||
jsval retval;
|
||||
|
@ -1074,7 +1074,7 @@ int ScriptingCore::executeCustomTouchEvent(TouchEvent::EventCode eventType,
|
|||
}
|
||||
|
||||
|
||||
int ScriptingCore::executeCustomTouchEvent(TouchEvent::EventCode eventType,
|
||||
int ScriptingCore::executeCustomTouchEvent(EventTouch::EventCode eventType,
|
||||
Touch *pTouch, JSObject *obj,
|
||||
jsval &retval)
|
||||
{
|
||||
|
|
|
@ -140,11 +140,11 @@ public:
|
|||
static void removeAllRoots(JSContext *cx);
|
||||
|
||||
|
||||
int executeCustomTouchEvent(TouchEvent::EventCode eventType,
|
||||
int executeCustomTouchEvent(EventTouch::EventCode eventType,
|
||||
Touch *pTouch, JSObject *obj, jsval &retval);
|
||||
int executeCustomTouchEvent(TouchEvent::EventCode eventType,
|
||||
int executeCustomTouchEvent(EventTouch::EventCode eventType,
|
||||
Touch *pTouch, JSObject *obj);
|
||||
int executeCustomTouchesEvent(TouchEvent::EventCode eventType,
|
||||
int executeCustomTouchesEvent(EventTouch::EventCode eventType,
|
||||
const std::vector<Touch*>& touches, JSObject *obj);
|
||||
/**
|
||||
* @return the global context
|
||||
|
|
|
@ -1 +1 @@
|
|||
7756f6d4cf4b992057e4f9b619a10021af30cd11
|
||||
b88df18e2512b5111debda3991f51c2e72a2e5da
|
|
@ -218,7 +218,7 @@ private:
|
|||
typedef std::pair<JSObject*, JSTouchDelegate*> TouchDelegatePair;
|
||||
static TouchDelegateMap sTouchDelegateMap;
|
||||
bool _needUnroot;
|
||||
TouchEventListener* _touchListener;
|
||||
EventListenerTouch* _touchListener;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -400,14 +400,14 @@ int LuaEngine::handleKeypadEvent(void* data)
|
|||
if (0 == handler)
|
||||
return 0;
|
||||
|
||||
KeyboardEvent::KeyCode action = keypadScriptData->actionType;
|
||||
EventKeyboard::KeyCode action = keypadScriptData->actionType;
|
||||
|
||||
switch(action)
|
||||
{
|
||||
case KeyboardEvent::KeyCode::KEY_BACKSPACE:
|
||||
case EventKeyboard::KeyCode::KEY_BACKSPACE:
|
||||
_stack->pushString("backClicked");
|
||||
break;
|
||||
case KeyboardEvent::KeyCode::KEY_MENU:
|
||||
case EventKeyboard::KeyCode::KEY_MENU:
|
||||
_stack->pushString("menuClicked");
|
||||
break;
|
||||
default:
|
||||
|
@ -484,19 +484,19 @@ int LuaEngine::handleTouchEvent(void* data)
|
|||
|
||||
switch (touchScriptData->actionType)
|
||||
{
|
||||
case TouchEvent::EventCode::BEGAN:
|
||||
case EventTouch::EventCode::BEGAN:
|
||||
_stack->pushString("began");
|
||||
break;
|
||||
|
||||
case TouchEvent::EventCode::MOVED:
|
||||
case EventTouch::EventCode::MOVED:
|
||||
_stack->pushString("moved");
|
||||
break;
|
||||
|
||||
case TouchEvent::EventCode::ENDED:
|
||||
case EventTouch::EventCode::ENDED:
|
||||
_stack->pushString("ended");
|
||||
break;
|
||||
|
||||
case TouchEvent::EventCode::CANCELLED:
|
||||
case EventTouch::EventCode::CANCELLED:
|
||||
_stack->pushString("cancelled");
|
||||
break;
|
||||
|
||||
|
@ -533,19 +533,19 @@ int LuaEngine::handleTouchesEvent(void* data)
|
|||
|
||||
switch (touchesScriptData->actionType)
|
||||
{
|
||||
case TouchEvent::EventCode::BEGAN:
|
||||
case EventTouch::EventCode::BEGAN:
|
||||
_stack->pushString("began");
|
||||
break;
|
||||
|
||||
case TouchEvent::EventCode::MOVED:
|
||||
case EventTouch::EventCode::MOVED:
|
||||
_stack->pushString("moved");
|
||||
break;
|
||||
|
||||
case TouchEvent::EventCode::ENDED:
|
||||
case EventTouch::EventCode::ENDED:
|
||||
_stack->pushString("ended");
|
||||
break;
|
||||
|
||||
case TouchEvent::EventCode::CANCELLED:
|
||||
case EventTouch::EventCode::CANCELLED:
|
||||
_stack->pushString("cancelled");
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue