mirror of https://github.com/axmolengine/axmol.git
Editbox init member variable (#18432)
* initialize _adjustHeight * remove unneeded void
This commit is contained in:
parent
d42098e2c4
commit
8e2ad2fd12
|
@ -32,17 +32,18 @@ namespace ui {
|
|||
|
||||
static const float CHECK_EDITBOX_POSITION_INTERVAL = 0.1f;
|
||||
|
||||
EditBox::EditBox(void)
|
||||
EditBox::EditBox()
|
||||
: _editBoxImpl(nullptr)
|
||||
, _delegate(nullptr)
|
||||
, _backgroundSprite(nullptr)
|
||||
, _adjustHeight(0.f)
|
||||
#if CC_ENABLE_SCRIPT_BINDING
|
||||
, _scriptEditBoxHandler(0)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
EditBox::~EditBox(void)
|
||||
EditBox::~EditBox()
|
||||
{
|
||||
CC_SAFE_DELETE(_editBoxImpl);
|
||||
#if CC_ENABLE_SCRIPT_BINDING
|
||||
|
@ -179,7 +180,7 @@ void EditBox::setText(const char* pText)
|
|||
}
|
||||
}
|
||||
|
||||
const char* EditBox::getText(void) const
|
||||
const char* EditBox::getText() const
|
||||
{
|
||||
if (_editBoxImpl != nullptr)
|
||||
{
|
||||
|
@ -212,7 +213,7 @@ void EditBox::setFontName(const char* pFontName)
|
|||
}
|
||||
}
|
||||
|
||||
const char* EditBox::getFontName(void) const
|
||||
const char* EditBox::getFontName() const
|
||||
{
|
||||
if (_editBoxImpl != nullptr)
|
||||
{
|
||||
|
@ -339,7 +340,7 @@ void EditBox::setPlaceHolder(const char* pText)
|
|||
}
|
||||
}
|
||||
|
||||
const char* EditBox::getPlaceHolder(void) const
|
||||
const char* EditBox::getPlaceHolder() const
|
||||
{
|
||||
if (_editBoxImpl != nullptr)
|
||||
{
|
||||
|
@ -494,7 +495,7 @@ void EditBox::draw(Renderer *renderer, const Mat4 &parentTransform, uint32_t par
|
|||
}
|
||||
}
|
||||
|
||||
void EditBox::onEnter(void)
|
||||
void EditBox::onEnter()
|
||||
{
|
||||
#if CC_ENABLE_SCRIPT_BINDING
|
||||
if (_scriptType == kScriptTypeJavascript)
|
||||
|
@ -522,7 +523,7 @@ void EditBox::updatePosition(float dt)
|
|||
}
|
||||
|
||||
|
||||
void EditBox::onExit(void)
|
||||
void EditBox::onExit()
|
||||
{
|
||||
#if CC_ENABLE_SCRIPT_BINDING
|
||||
if (_scriptType == kScriptTypeJavascript)
|
||||
|
@ -597,7 +598,7 @@ void EditBox::registerScriptEditBoxHandler(int handler)
|
|||
_scriptEditBoxHandler = handler;
|
||||
}
|
||||
|
||||
void EditBox::unregisterScriptEditBoxHandler(void)
|
||||
void EditBox::unregisterScriptEditBoxHandler()
|
||||
{
|
||||
if (0 != _scriptEditBoxHandler)
|
||||
{
|
||||
|
|
|
@ -234,14 +234,14 @@ namespace ui {
|
|||
* @js ctor
|
||||
* @lua new
|
||||
*/
|
||||
EditBox(void);
|
||||
EditBox();
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual ~EditBox(void);
|
||||
virtual ~EditBox();
|
||||
|
||||
/**
|
||||
* Init edit box with specified size. This method should be invoked right after constructor.
|
||||
|
@ -309,13 +309,13 @@ namespace ui {
|
|||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
void unregisterScriptEditBoxHandler(void);
|
||||
void unregisterScriptEditBoxHandler();
|
||||
/**
|
||||
* get a script Handler
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
int getScriptEditBoxHandler(void){ return _scriptEditBoxHandler ;}
|
||||
int getScriptEditBoxHandler(){ return _scriptEditBoxHandler ;}
|
||||
|
||||
#endif // #if CC_ENABLE_SCRIPT_BINDING
|
||||
|
||||
|
@ -329,7 +329,7 @@ namespace ui {
|
|||
* Get the text entered in the edit box.
|
||||
* @return The text entered in the edit box.
|
||||
*/
|
||||
const char* getText(void) const;
|
||||
const char* getText() const;
|
||||
|
||||
/**
|
||||
* Set the font. Only system font is allowed.
|
||||
|
@ -430,7 +430,7 @@ namespace ui {
|
|||
* Get a text in the edit box that acts as a placeholder when an
|
||||
* edit box is empty.
|
||||
*/
|
||||
const char* getPlaceHolder(void) const;
|
||||
const char* getPlaceHolder() const;
|
||||
|
||||
/**
|
||||
* Set the input mode of the edit box.
|
||||
|
@ -514,12 +514,12 @@ namespace ui {
|
|||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual void onEnter(void) override;
|
||||
virtual void onEnter() override;
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual void onExit(void) override;
|
||||
virtual void onExit() override;
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
|
Loading…
Reference in New Issue