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

Method create

Source/AlertLayer.cpp:84–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84AlertLayer* AlertLayer::create(std::string_view title, std::string_view desc, std::string_view btn1, std::string_view btn2, float width, std::function<void(Node*)> btn1Callback, std::function<void(Node*)> btn2Callback)
85{
86 auto pRet = new(std::nothrow) AlertLayer();
87
88 if (pRet && pRet->init(title, desc, btn1, btn2, width, btn1Callback, btn2Callback))
89 {
90 pRet->autorelease();
91 return pRet;
92 }
93 else
94 {
95 AX_SAFE_DELETE(pRet);
96 return nullptr;
97 }
98}
99
100AlertLayer* AlertLayer::create(std::string_view title, std::string_view desc, std::string_view btn1, std::string_view btn2, std::function<void(Node*)> btn1Callback, std::function<void(Node*)> btn2Callback) {
101 return AlertLayer::create(title, desc, btn1, btn2, 500, btn1Callback, btn2Callback);

Callers

nothing calls this directly

Calls 2

createFunction · 0.85
initMethod · 0.45

Tested by

no test coverage detected