issue #2430:fix some errors

This commit is contained in:
minggo 2013-07-26 18:07:40 +08:00
parent 859da78499
commit 3cb40b36e4
5 changed files with 8 additions and 8 deletions

View File

@ -73,9 +73,9 @@ public:
TOP = 0x13, ///< Horizontal center and vertical top.
TOP_RIGHT = 0x12, ///< Horizontal right and vertical top.
RIGHT = 0x32, ///< Horizontal right and vertical center.
BOTTOEM_RIGHT = 0x22, ///< Horizontal right and vertical bottom.
BOTTOM_RIGHT = 0x22, ///< Horizontal right and vertical bottom.
BOTTOM = 0x23, ///< Horizontal center and vertical bottom.
BOTTOEM_LEFT = 0x21, ///< Horizontal left and vertical bottom.
BOTTOM_LEFT = 0x21, ///< Horizontal left and vertical bottom.
LEFT = 0x31, ///< Horizontal left and vertical center.
TOP_LEFT = 0x11, ///< Horizontal left and vertical top.
};

View File

@ -242,7 +242,7 @@ public:
*/
int computeLineStart(FT_Face face, Image::TextAlign eAlignMask, int line) {
int lineWidth = textLines.at(line).lineWidth;
if (eAlignMask == Image::TEXT_ALIGN_CENTER || eAlignMask == Image::TextAlign::TOP || eAlignMask == Image::TextAlign::BOTTOM) {
if (eAlignMask == Image::TextAlign::CENTER || eAlignMask == Image::TextAlign::TOP || eAlignMask == Image::TextAlign::BOTTOM) {
return (iMaxLineWidth - lineWidth) / 2;
} else if (eAlignMask == Image::TextAlign::RIGHT || eAlignMask == Image::TextAlign::TOP_RIGHT || eAlignMask == Image::TextAlign::BOTTOM_RIGHT) {
return (iMaxLineWidth - lineWidth);

View File

@ -474,7 +474,7 @@ bool Texture2D::initWithString(const char *text, const FontDefinition& textDefin
else if (Label::VAlignment::BOTTOM == textDefinition._vertAlignment)
{
eAlign = (Label::HAlignment::CENTER == textDefinition._alignment) ? Image::TextAlign::BOTTOM
: (Label::HAlignment::LEFT == textDefinition._alignment) ? Image::TextAlign::BOTTOEM_LEFT : Image::TextAlign::BOTTOEM_RIGHT;
: (Label::HAlignment::LEFT == textDefinition._alignment) ? Image::TextAlign::BOTTOM_LEFT : Image::TextAlign::BOTTOM_RIGHT;
}
else
{

View File

@ -42,7 +42,7 @@ EditBoxImplWin::EditBoxImplWin(EditBox* pEditText)
, _labelPlaceHolder(NULL)
, _editBoxInputMode(EditBox::InputMode::SINGLE_LINE)
, _editBoxInputFlag(EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS)
, _keyboardReturnType(kKeyboardReturnTypeDefault)
, _keyboardReturnType(EditBox::EditBox::KeyboardReturnType::DEFAULT)
, _colText(Color3B::WHITE)
, _colPlaceHolder(Color3B::GRAY)
, _maxLength(-1)

View File

@ -48,7 +48,7 @@ EditBoxTest::EditBoxTest()
_editName->setPlaceHolder("Name:");
_editName->setPlaceholderFontColor(Color3B::WHITE);
_editName->setMaxLength(8);
_editName->setReturnType(kKeyboardReturnTypeDone);
_editName->setReturnType(EditBox::KeyboardReturnType::DONE);
_editName->setDelegate(this);
addChild(_editName);
@ -63,7 +63,7 @@ EditBoxTest::EditBoxTest()
_editPassword->setFontColor(Color3B::GREEN);
_editPassword->setPlaceHolder("Password:");
_editPassword->setMaxLength(6);
_editPassword->setInputFlag(kEditBoxInputFlagPassword);
_editPassword->setInputFlag(EditBox::InputFlag::PASSWORD);
_editPassword->setInputMode(EditBox::InputMode::SINGLE_LINE);
_editPassword->setDelegate(this);
addChild(_editPassword);
@ -73,7 +73,7 @@ EditBoxTest::EditBoxTest()
_editEmail->setPosition(Point(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/4));
_editEmail->setAnchorPoint(Point(0.5, 1.0f));
_editEmail->setPlaceHolder("Email:");
_editEmail->setInputMode(kEditBoxInputModeEmailAddr);
_editEmail->setInputMode(EditBox::InputMode::EMAIL_ADDRESS);
_editEmail->setDelegate(this);
addChild(_editEmail);