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

Method create

Source/TextButton.cpp:105–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103// Create funcs
104#pragma region
105TextButton* TextButton::create(std::string_view text, std::string_view font, float width, float height, std::string_view bgTexture, std::function<void(TextButton*)> callback) {
106 auto pRet = new(std::nothrow) TextButton();
107
108 if (pRet && pRet->init(text, font, width, height, bgTexture, callback)) {
109 pRet->autorelease();
110 return pRet;
111 } else {
112 AX_SAFE_DELETE(pRet);
113 return nullptr;
114 }
115}
116
117TextButton* TextButton::create(std::string_view text, std::function<void(TextButton*)> callback) {
118 return TextButton::create(text, GameToolbox::getTextureString("goldFont.fnt"), 0, 0, GameToolbox::getTextureString("GJ_button_01.png"), callback);

Callers

nothing calls this directly

Calls 2

createFunction · 0.85
initMethod · 0.45

Tested by

no test coverage detected