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

Method create

Source/ButtonSprite.cpp:29–41  ·  view source on GitHub ↗

cmake --build build --config RelWithDebInfo --target OpenGD

Source from the content-addressed store, hash-verified

27USING_NS_AX;
28//cmake --build build --config RelWithDebInfo --target OpenGD
29ButtonSprite* ButtonSprite::create(std::string_view caption, int width, int minWidth, float scale, bool absoluteWidth, std::string_view font, std::string_view texture, float height)
30{
31 ButtonSprite* ret = new ButtonSprite();
32
33 if (ret && ret->initWithText(caption, width, minWidth, scale, absoluteWidth, font, texture, height))
34 {
35 ret->autorelease();
36 return ret;
37 }
38
39 AX_SAFE_DELETE(ret);
40 return nullptr;
41}
42
43ButtonSprite* ButtonSprite::create(Sprite* iconSprite, int width, int minWidth, float height, float scale, bool absoluteWidth, std::string_view texture, bool dontUseScale9)
44{

Callers

nothing calls this directly

Calls 3

createFunction · 0.85
initWithTextMethod · 0.80
initWithSpriteMethod · 0.80

Tested by

no test coverage detected