mirror of https://github.com/axmolengine/axmol.git
Merge pull request #5779 from Dhilan007/develop_label2
EditBox:fixed nothing to display when input flag is PASSWORD on Android.
This commit is contained in:
commit
8f80b76bd1
|
@ -169,7 +169,7 @@ void EditBoxImplAndroid::setText(const char* pText)
|
|||
long length = cc_utf8_strlen(_text.c_str(), -1);
|
||||
for (long i = 0; i < length; i++)
|
||||
{
|
||||
strToShow.append("\u25CF");
|
||||
strToShow.append("*");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -70,14 +70,16 @@ void EditBoxImplWin::doAnimationWhenKeyboardMove(float duration, float distance)
|
|||
bool EditBoxImplWin::initWithSize(const Size& size)
|
||||
{
|
||||
//! int fontSize = getFontSizeAccordingHeightJni(size.height-12);
|
||||
_label = LabelTTF::create("", "", size.height-12);
|
||||
_label = Label::create();
|
||||
_label->setFontSize(size.height-12);
|
||||
// align the text vertically center
|
||||
_label->setAnchorPoint(Point(0, 0.5f));
|
||||
_label->setPosition(Point(5, size.height / 2.0f));
|
||||
_label->setColor(_colText);
|
||||
_editBox->addChild(_label);
|
||||
|
||||
_labelPlaceHolder = LabelTTF::create("", "", size.height-12);
|
||||
_labelPlaceHolder = Label::create();
|
||||
_labelPlaceHolder->setFontSize(size.height-12);
|
||||
// align the text vertically center
|
||||
_labelPlaceHolder->setAnchorPoint(Point(0, 0.5f));
|
||||
_labelPlaceHolder->setPosition(Point(5, size.height / 2.0f));
|
||||
|
|
|
@ -84,8 +84,8 @@ public:
|
|||
virtual void onEnter(void);
|
||||
private:
|
||||
|
||||
LabelTTF* _label;
|
||||
LabelTTF* _labelPlaceHolder;
|
||||
Label* _label;
|
||||
Label* _labelPlaceHolder;
|
||||
EditBox::InputMode _editBoxInputMode;
|
||||
EditBox::InputFlag _editBoxInputFlag;
|
||||
EditBox::KeyboardReturnType _keyboardReturnType;
|
||||
|
|
Loading…
Reference in New Issue