issue #2143: Adding CCEditBox::getDelegate.

This commit is contained in:
James Chen 2013-06-05 14:30:14 +08:00
parent 3acdb327fb
commit 47c8205e39
2 changed files with 7 additions and 1 deletions

View File

@ -107,6 +107,11 @@ void CCEditBox::setDelegate(CCEditBoxDelegate* pDelegate)
} }
} }
CCEditBoxDelegate* CCEditBox::getDelegate()
{
return m_pDelegate;
}
void CCEditBox::setText(const char* pText) void CCEditBox::setText(const char* pText)
{ {
if (pText != NULL) if (pText != NULL)

View File

@ -196,9 +196,10 @@ public:
bool initWithSizeAndBackgroundSprite(const CCSize& size, CCScale9Sprite* pNormal9SpriteBg); bool initWithSizeAndBackgroundSprite(const CCSize& size, CCScale9Sprite* pNormal9SpriteBg);
/** /**
* Set the delegate for edit box. * Gets/Sets the delegate for edit box.
*/ */
void setDelegate(CCEditBoxDelegate* pDelegate); void setDelegate(CCEditBoxDelegate* pDelegate);
CCEditBoxDelegate* getDelegate();
/** /**
* Registers a script function that will be called for EditBox events. * Registers a script function that will be called for EditBox events.
* *