mirror of https://github.com/axmolengine/axmol.git
fix conflict
This commit is contained in:
commit
7495a611ea
|
@ -839,6 +839,18 @@ MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler s
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||||
|
MenuItemToggle * MenuItemToggle::createWithCallbackVA(const ccMenuCallback &callback, MenuItem* item, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start(args, item);
|
||||||
|
MenuItemToggle *ret = new MenuItemToggle();
|
||||||
|
ret->initWithCallback(callback, item, args);
|
||||||
|
ret->autorelease();
|
||||||
|
va_end(args);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#else
|
||||||
MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callback, MenuItem* item, ...)
|
MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callback, MenuItem* item, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
@ -849,6 +861,7 @@ MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callba
|
||||||
va_end(args);
|
va_end(args);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
MenuItemToggle * MenuItemToggle::create()
|
MenuItemToggle * MenuItemToggle::create()
|
||||||
{
|
{
|
||||||
|
|
|
@ -478,7 +478,25 @@ public:
|
||||||
/** creates a menu item from a Array with a callable object */
|
/** creates a menu item from a Array with a callable object */
|
||||||
static MenuItemToggle * createWithCallback(const ccMenuCallback& callback, const Vector<MenuItem*>& menuItems);
|
static MenuItemToggle * createWithCallback(const ccMenuCallback& callback, const Vector<MenuItem*>& menuItems);
|
||||||
/** creates a menu item from a list of items with a callable object */
|
/** creates a menu item from a list of items with a callable object */
|
||||||
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||||
|
// WP8 in VS2012 does not support nullptr in variable args lists and variadic templates are also not supported
|
||||||
|
typedef MenuItem* M;
|
||||||
|
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, NULL); }
|
||||||
|
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, NULL); }
|
||||||
|
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, NULL); }
|
||||||
|
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, NULL); }
|
||||||
|
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, NULL); }
|
||||||
|
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, NULL); }
|
||||||
|
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, NULL); }
|
||||||
|
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, m8, NULL); }
|
||||||
|
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, m8, m9, NULL); }
|
||||||
|
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, M m10, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, NULL); }
|
||||||
|
|
||||||
|
// On WP8 for lists longer than 10 items, use createWithArray or variadicCreate with NULL as the last argument
|
||||||
|
static MenuItemToggle* createWithCallbackVA(const ccMenuCallback& callback, M item, ...);
|
||||||
|
#else
|
||||||
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, MenuItem* item, ...) CC_REQUIRES_NULL_TERMINATION;
|
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, MenuItem* item, ...) CC_REQUIRES_NULL_TERMINATION;
|
||||||
|
#endif
|
||||||
/** creates a menu item with no target/selector and no items */
|
/** creates a menu item with no target/selector and no items */
|
||||||
static MenuItemToggle* create();
|
static MenuItemToggle* create();
|
||||||
/** creates a menu item with a item */
|
/** creates a menu item with a item */
|
||||||
|
|
|
@ -292,7 +292,7 @@ void MeshCommand::releaseVAO()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
|
||||||
void MeshCommand::listenRendererRecreated(EventCustom* event)
|
void MeshCommand::listenRendererRecreated(EventCustom* event)
|
||||||
{
|
{
|
||||||
_vao = 0;
|
_vao = 0;
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
|
|
||||||
uint32_t getMaterialID() const { return _materialID; }
|
uint32_t getMaterialID() const { return _materialID; }
|
||||||
|
|
||||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
|
||||||
void listenRendererRecreated(EventCustom* event);
|
void listenRendererRecreated(EventCustom* event);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -445,7 +445,7 @@ MenuLayer4::MenuLayer4()
|
||||||
item3, item4,
|
item3, item4,
|
||||||
back, nullptr ); // 9 items.
|
back, nullptr ); // 9 items.
|
||||||
|
|
||||||
menu->alignItemsInColumns(2, 2, 2, 2, 1, nullptr);
|
menu->alignItemsInColumns(2, 2, 2, 2, 1, NULL);
|
||||||
|
|
||||||
addChild( menu );
|
addChild( menu );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue