MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / create

Method create

Source/MenuItemSpriteExtra.cpp:102–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102MenuItemSpriteExtra* MenuItemSpriteExtra::create(std::string_view sprite, std::function<void(Node*)> callback) {
103 MenuItemSpriteExtra* pRet = new(std::nothrow) MenuItemSpriteExtra(sprite, nullptr, callback);
104
105 if (pRet && pRet->init()) {
106 pRet->autorelease();
107 return pRet;
108 } else {
109 AX_SAFE_DELETE(pRet);
110 return nullptr;
111 }
112}
113
114MenuItemSpriteExtra* MenuItemSpriteExtra::create(Node* sprite, std::function<void(Node*)> callback) {
115 MenuItemSpriteExtra* pRet = new(std::nothrow) MenuItemSpriteExtra("", sprite, callback);

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected