| 49 | } |
| 50 | |
| 51 | TextInputNode* TextInputNode::create(float width, float height, std::string_view font, std::string_view placeholder, int scale) |
| 52 | { |
| 53 | TextInputNode* pRet = new TextInputNode(); |
| 54 | |
| 55 | if (pRet && pRet->init(width, height, placeholder, font, scale)) |
| 56 | { |
| 57 | pRet->autorelease(); |
| 58 | return pRet; |
| 59 | } |
| 60 | |
| 61 | AX_SAFE_DELETE(pRet); |
| 62 | return nullptr; |
| 63 | } |
| 64 | |
| 65 | bool TextInputNode::init(float width, float height, std::string_view placeholder, std::string_view font, int scale) |
| 66 | { |