Merge pull request #4766 from dumganhar/gui-rename

Merge PR #4761, GUI class name renaming
This commit is contained in:
James Chen 2014-01-01 05:44:23 -08:00
commit 2abb152c01
36 changed files with 200 additions and 200 deletions

View File

@ -1 +1 @@
812ab716d10a52b752f0d15b2393b2b0a7c8e969
4b92c964454c54c1b5df9576f11365c53e253724

View File

@ -218,12 +218,12 @@ Widget* WidgetPropertiesReader0250::widgetFromJsonDictionary(const rapidjson::Va
}
else if (classname && strcmp(classname, "Label") == 0)
{
widget = cocos2d::gui::Label::create();
widget = cocos2d::gui::Text::create();
setPropsForLabelFromJsonDictionary(widget, uiOptions);
}
else if (classname && strcmp(classname, "LabelAtlas") == 0)
{
widget = cocos2d::gui::LabelAtlas::create();
widget = cocos2d::gui::TextAtlas::create();
setPropsForLabelAtlasFromJsonDictionary(widget, uiOptions);
}
else if (classname && strcmp(classname, "LoadingBar") == 0)
@ -236,7 +236,7 @@ Widget* WidgetPropertiesReader0250::widgetFromJsonDictionary(const rapidjson::Va
}
else if (classname && strcmp(classname, "TextArea") == 0)
{
widget = cocos2d::gui::Label::create();
widget = cocos2d::gui::Text::create();
setPropsForLabelFromJsonDictionary(widget, uiOptions);
}
else if (classname && strcmp(classname, "TextButton") == 0)
@ -266,7 +266,7 @@ Widget* WidgetPropertiesReader0250::widgetFromJsonDictionary(const rapidjson::Va
}
else if (classname && strcmp(classname, "LabelBMFont") == 0)
{
widget = cocos2d::gui::LabelBMFont::create();
widget = cocos2d::gui::TextBMFont::create();
setPropsForLabelBMFontFromJsonDictionary(widget, uiOptions);
}
else if (classname && strcmp(classname, "DragPanel") == 0)
@ -543,7 +543,7 @@ void WidgetPropertiesReader0250::setPropsForImageViewFromJsonDictionary(Widget*w
void WidgetPropertiesReader0250::setPropsForLabelFromJsonDictionary(Widget*widget,const rapidjson::Value& options)
{
setPropsForWidgetFromJsonDictionary(widget, options);
cocos2d::gui::Label* label = static_cast<cocos2d::gui::Label*>(widget);
cocos2d::gui::Text* label = static_cast<cocos2d::gui::Text*>(widget);
bool touchScaleChangeAble = DICTOOL->getBooleanValue_json(options, "touchScaleEnable");
label->setTouchScaleChangeEnabled(touchScaleChangeAble);
const char* text = DICTOOL->getStringValue_json(options, "text");
@ -581,7 +581,7 @@ void WidgetPropertiesReader0250::setPropsForLabelFromJsonDictionary(Widget*widge
void WidgetPropertiesReader0250::setPropsForLabelAtlasFromJsonDictionary(Widget*widget,const rapidjson::Value& options)
{
setPropsForWidgetFromJsonDictionary(widget, options);
cocos2d::gui::LabelAtlas* labelAtlas = static_cast<cocos2d::gui::LabelAtlas*>(widget);
cocos2d::gui::TextAtlas* labelAtlas = static_cast<cocos2d::gui::TextAtlas*>(widget);
bool sv = DICTOOL->checkObjectExist_json(options, "stringValue");
bool cmf = DICTOOL->checkObjectExist_json(options, "charMapFile");
bool iw = DICTOOL->checkObjectExist_json(options, "itemWidth");
@ -837,7 +837,7 @@ void WidgetPropertiesReader0250::setPropsForLabelBMFontFromJsonDictionary(Widget
setPropsForWidgetFromJsonDictionary(widget, options);
cocos2d::gui::LabelBMFont* labelBMFont = static_cast<cocos2d::gui::LabelBMFont*>(widget);
cocos2d::gui::TextBMFont* labelBMFont = static_cast<cocos2d::gui::TextBMFont*>(widget);
std::string tp_c = m_strFilePath;
const char* cmf_tp = nullptr;
@ -917,12 +917,12 @@ Widget* WidgetPropertiesReader0300::widgetFromJsonDictionary(const rapidjson::Va
}
else if (classname && strcmp(classname, "Label") == 0)
{
widget = cocos2d::gui::Label::create();
widget = cocos2d::gui::Text::create();
setPropsForLabelFromJsonDictionary(widget, uiOptions);
}
else if (classname && strcmp(classname, "LabelAtlas") == 0)
{
widget = cocos2d::gui::LabelAtlas::create();
widget = cocos2d::gui::TextAtlas::create();
setPropsForLabelAtlasFromJsonDictionary(widget, uiOptions);
}
else if (classname && strcmp(classname, "LoadingBar") == 0)
@ -935,7 +935,7 @@ Widget* WidgetPropertiesReader0300::widgetFromJsonDictionary(const rapidjson::Va
}
else if (classname && strcmp(classname, "TextArea") == 0)
{
widget = cocos2d::gui::Label::create();
widget = cocos2d::gui::Text::create();
setPropsForLabelFromJsonDictionary(widget, uiOptions);
}
else if (classname && strcmp(classname, "TextButton") == 0)
@ -965,7 +965,7 @@ Widget* WidgetPropertiesReader0300::widgetFromJsonDictionary(const rapidjson::Va
}
else if (classname && strcmp(classname, "LabelBMFont") == 0)
{
widget = cocos2d::gui::LabelBMFont::create();
widget = cocos2d::gui::TextBMFont::create();
setPropsForLabelBMFontFromJsonDictionary(widget, uiOptions);
}
else if (classname && strcmp(classname, "DragPanel") == 0)
@ -1434,7 +1434,7 @@ void WidgetPropertiesReader0300::setPropsForImageViewFromJsonDictionary(Widget*w
void WidgetPropertiesReader0300::setPropsForLabelFromJsonDictionary(Widget*widget,const rapidjson::Value& options)
{
setPropsForWidgetFromJsonDictionary(widget, options);
cocos2d::gui::Label* label = static_cast<cocos2d::gui::Label*>(widget);
cocos2d::gui::Text* label = static_cast<cocos2d::gui::Text*>(widget);
bool touchScaleChangeAble = DICTOOL->getBooleanValue_json(options, "touchScaleEnable");
label->setTouchScaleChangeEnabled(touchScaleChangeAble);
const char* text = DICTOOL->getStringValue_json(options, "text");
@ -1472,7 +1472,7 @@ void WidgetPropertiesReader0300::setPropsForLabelFromJsonDictionary(Widget*widge
void WidgetPropertiesReader0300::setPropsForLabelAtlasFromJsonDictionary(Widget*widget,const rapidjson::Value& options)
{
setPropsForWidgetFromJsonDictionary(widget, options);
cocos2d::gui::LabelAtlas* labelAtlas = static_cast<cocos2d::gui::LabelAtlas*>(widget);
cocos2d::gui::TextAtlas* labelAtlas = static_cast<cocos2d::gui::TextAtlas*>(widget);
bool sv = DICTOOL->checkObjectExist_json(options, "stringValue");
bool cmf = DICTOOL->checkObjectExist_json(options, "charMapFile");
bool iw = DICTOOL->checkObjectExist_json(options, "itemWidth");
@ -1850,7 +1850,7 @@ void WidgetPropertiesReader0300::setPropsForLabelBMFontFromJsonDictionary(Widget
{
setPropsForWidgetFromJsonDictionary(widget, options);
cocos2d::gui::LabelBMFont* labelBMFont = static_cast<cocos2d::gui::LabelBMFont*>(widget);
cocos2d::gui::TextBMFont* labelBMFont = static_cast<cocos2d::gui::TextBMFont*>(widget);
const rapidjson::Value& cmftDic = DICTOOL->getSubDictionary_json(options, "fileNameData");
int cmfType = DICTOOL->getIntValue_json(cmftDic, "resourceType");

View File

@ -18,9 +18,9 @@ UIScrollView.cpp \
UIButton.cpp \
UICheckBox.cpp \
UIImageView.cpp \
UILabel.cpp \
UILabelAtlas.cpp \
UILabelBMFont.cpp \
UIText.cpp \
UITextAtlas.cpp \
UITextBMFont.cpp \
UILoadingBar.cpp \
UISlider.cpp \
UITextField.cpp

View File

@ -11,9 +11,9 @@ set(GUI_SRC
UIButton.cpp
UICheckBox.cpp
UIImageView.cpp
UILabel.cpp
UILabelAtlas.cpp
UILabelBMFont.cpp
UIText.cpp
UITextAtlas.cpp
UITextBMFont.cpp
UILoadingBar.cpp
UISlider.cpp
UITextField.cpp

View File

@ -31,14 +31,14 @@
#include "gui/UIButton.h"
#include "gui/UICheckBox.h"
#include "gui/UIImageView.h"
#include "gui/UILabel.h"
#include "gui/UILabelAtlas.h"
#include "gui/UIText.h"
#include "gui/UITextAtlas.h"
#include "gui/UILoadingBar.h"
#include "gui/UIScrollView.h"
#include "gui/UIListView.h"
#include "gui/UISlider.h"
#include "gui/UITextField.h"
#include "gui/UILabelBMFont.h"
#include "gui/UITextBMFont.h"
#include "gui/UIPageView.h"
#include "gui/UIHelper.h"

View File

@ -22,7 +22,7 @@
THE SOFTWARE.
****************************************************************************/
#include "gui/UILabel.h"
#include "gui/UIText.h"
NS_CC_BEGIN
@ -30,7 +30,7 @@ namespace gui {
#define LABELRENDERERZ (-1)
Label::Label():
Text::Text():
_touchScaleChangeEnabled(false),
_normalScaleValueX(1.0f),
_normalScaleValueY(1.0f),
@ -41,14 +41,14 @@ _labelRenderer(nullptr)
{
}
Label::~Label()
Text::~Text()
{
}
Label* Label::create()
Text* Text::create()
{
Label* widget = new Label();
Text* widget = new Text();
if (widget && widget->init())
{
widget->autorelease();
@ -58,7 +58,7 @@ Label* Label::create()
return nullptr;
}
bool Label::init()
bool Text::init()
{
if (Widget::init())
{
@ -67,13 +67,13 @@ bool Label::init()
return false;
}
void Label::initRenderer()
void Text::initRenderer()
{
_labelRenderer = LabelTTF::create();
Node::addChild(_labelRenderer, LABELRENDERERZ, -1);
}
void Label::setText(const std::string& text)
void Text::setText(const std::string& text)
{
if (text.size()==0)
return;
@ -82,79 +82,79 @@ void Label::setText(const std::string& text)
labelScaleChangedWithSize();
}
const std::string& Label::getStringValue()
const std::string& Text::getStringValue()
{
return _labelRenderer->getString();
}
size_t Label::getStringLength()
size_t Text::getStringLength()
{
return _labelRenderer->getString().size();
}
void Label::setFontSize(int size)
void Text::setFontSize(int size)
{
_fontSize = size;
_labelRenderer->setFontSize(size);
labelScaleChangedWithSize();
}
void Label::setFontName(const std::string& name)
void Text::setFontName(const std::string& name)
{
_fontName = name;
_labelRenderer->setFontName(name);
labelScaleChangedWithSize();
}
void Label::setTextAreaSize(const Size &size)
void Text::setTextAreaSize(const Size &size)
{
_labelRenderer->setDimensions(size);
labelScaleChangedWithSize();
}
void Label::setTextHorizontalAlignment(TextHAlignment alignment)
void Text::setTextHorizontalAlignment(TextHAlignment alignment)
{
_labelRenderer->setHorizontalAlignment(alignment);
labelScaleChangedWithSize();
}
void Label::setTextVerticalAlignment(TextVAlignment alignment)
void Text::setTextVerticalAlignment(TextVAlignment alignment)
{
_labelRenderer->setVerticalAlignment(alignment);
labelScaleChangedWithSize();
}
void Label::setTouchScaleChangeEnabled(bool enable)
void Text::setTouchScaleChangeEnabled(bool enable)
{
_touchScaleChangeEnabled = enable;
_normalScaleValueX = getScaleX();
_normalScaleValueY = getScaleY();
}
void Label::setScale(float fScale)
void Text::setScale(float fScale)
{
Widget::setScale(fScale);
_normalScaleValueX = _normalScaleValueY = fScale;
}
void Label::setScaleX(float fScaleX)
void Text::setScaleX(float fScaleX)
{
Widget::setScaleX(fScaleX);
_normalScaleValueX = fScaleX;
}
void Label::setScaleY(float fScaleY)
void Text::setScaleY(float fScaleY)
{
Widget::setScaleY(fScaleY);
_normalScaleValueY = fScaleY;
}
bool Label::isTouchScaleChangeEnabled()
bool Text::isTouchScaleChangeEnabled()
{
return _touchScaleChangeEnabled;
}
void Label::onPressStateChangedToNormal()
void Text::onPressStateChangedToNormal()
{
if (!_touchScaleChangeEnabled)
{
@ -163,7 +163,7 @@ void Label::onPressStateChangedToNormal()
clickScale(_normalScaleValueX, _normalScaleValueY);
}
void Label::onPressStateChangedToPressed()
void Text::onPressStateChangedToPressed()
{
if (!_touchScaleChangeEnabled)
{
@ -172,60 +172,60 @@ void Label::onPressStateChangedToPressed()
clickScale(_normalScaleValueX + _onSelectedScaleOffset, _normalScaleValueY + _onSelectedScaleOffset);
}
void Label::onPressStateChangedToDisabled()
void Text::onPressStateChangedToDisabled()
{
}
void Label::clickScale(float scaleX, float scaleY)
void Text::clickScale(float scaleX, float scaleY)
{
setScaleX(scaleX);
setScaleY(scaleY);
}
void Label::setFlipX(bool flipX)
void Text::setFlipX(bool flipX)
{
_labelRenderer->setFlippedX(flipX);
}
void Label::setFlipY(bool flipY)
void Text::setFlipY(bool flipY)
{
_labelRenderer->setFlippedY(flipY);
}
bool Label::isFlipX()
bool Text::isFlipX()
{
return _labelRenderer->isFlippedX();
}
bool Label::isFlipY()
bool Text::isFlipY()
{
return _labelRenderer->isFlippedY();
}
void Label::setAnchorPoint(const Point &pt)
void Text::setAnchorPoint(const Point &pt)
{
Widget::setAnchorPoint(pt);
_labelRenderer->setAnchorPoint(pt);
}
void Label::onSizeChanged()
void Text::onSizeChanged()
{
Widget::onSizeChanged();
labelScaleChangedWithSize();
}
const Size& Label::getContentSize() const
const Size& Text::getContentSize() const
{
return _labelRenderer->getContentSize();
}
Node* Label::getVirtualRenderer()
Node* Text::getVirtualRenderer()
{
return _labelRenderer;
}
void Label::labelScaleChangedWithSize()
void Text::labelScaleChangedWithSize()
{
if (_ignoreSize)
{
@ -248,19 +248,19 @@ void Label::labelScaleChangedWithSize()
}
std::string Label::getDescription() const
std::string Text::getDescription() const
{
return "Label";
}
Widget* Label::createCloneInstance()
Widget* Text::createCloneInstance()
{
return Label::create();
return Text::create();
}
void Label::copySpecialProperties(Widget *widget)
void Text::copySpecialProperties(Widget *widget)
{
Label* label = dynamic_cast<Label*>(widget);
Text* label = dynamic_cast<Text*>(widget);
if (label)
{
setFontName(label->_fontName.c_str());

View File

@ -35,23 +35,23 @@ namespace gui {
* @js NA
* @lua NA
*/
class Label : public Widget
class Text : public Widget
{
public:
/**
* Default constructor
*/
Label();
Text();
/**
* Default destructor
*/
virtual ~Label();
virtual ~Text();
/**
* Allocates and initializes.
*/
static Label* create();
static Text* create();
/**
* Changes the string value of label.

View File

@ -22,7 +22,7 @@
THE SOFTWARE.
****************************************************************************/
#include "gui/UILabelAtlas.h"
#include "gui/UITextAtlas.h"
NS_CC_BEGIN
@ -76,7 +76,7 @@ void UICCLabelAtlas::draw()
LabelAtlas::LabelAtlas():
TextAtlas::TextAtlas():
_labelAtlasRenderer(nullptr),
_stringValue(""),
_charMapFileName(""),
@ -87,14 +87,14 @@ _startCharMap("")
}
LabelAtlas::~LabelAtlas()
TextAtlas::~TextAtlas()
{
}
LabelAtlas* LabelAtlas::create()
TextAtlas* TextAtlas::create()
{
LabelAtlas* widget = new LabelAtlas();
TextAtlas* widget = new TextAtlas();
if (widget && widget->init())
{
widget->autorelease();
@ -104,13 +104,13 @@ LabelAtlas* LabelAtlas::create()
return nullptr;
}
void LabelAtlas::initRenderer()
void TextAtlas::initRenderer()
{
_labelAtlasRenderer = UICCLabelAtlas::create();
Node::addChild(_labelAtlasRenderer, LABELATLASRENDERERZ, -1);
}
void LabelAtlas::setProperty(const std::string& stringValue, const std::string& charMapFile, int itemWidth, int itemHeight, const std::string& startCharMap)
void TextAtlas::setProperty(const std::string& stringValue, const std::string& charMapFile, int itemWidth, int itemHeight, const std::string& startCharMap)
{
_stringValue = stringValue;
_charMapFileName = charMapFile;
@ -122,41 +122,41 @@ void LabelAtlas::setProperty(const std::string& stringValue, const std::string&
labelAtlasScaleChangedWithSize();
}
void LabelAtlas::setStringValue(const std::string& value)
void TextAtlas::setStringValue(const std::string& value)
{
_stringValue = value;
_labelAtlasRenderer->setString(value);
labelAtlasScaleChangedWithSize();
}
const std::string& LabelAtlas::getStringValue() const
const std::string& TextAtlas::getStringValue() const
{
return _labelAtlasRenderer->getString();
}
void LabelAtlas::setAnchorPoint(const Point &pt)
void TextAtlas::setAnchorPoint(const Point &pt)
{
Widget::setAnchorPoint(pt);
_labelAtlasRenderer->setAnchorPoint(Point(pt.x, pt.y));
}
void LabelAtlas::onSizeChanged()
void TextAtlas::onSizeChanged()
{
Widget::onSizeChanged();
labelAtlasScaleChangedWithSize();
}
const Size& LabelAtlas::getContentSize() const
const Size& TextAtlas::getContentSize() const
{
return _labelAtlasRenderer->getContentSize();
}
Node* LabelAtlas::getVirtualRenderer()
Node* TextAtlas::getVirtualRenderer()
{
return _labelAtlasRenderer;
}
void LabelAtlas::labelAtlasScaleChangedWithSize()
void TextAtlas::labelAtlasScaleChangedWithSize()
{
if (_ignoreSize)
{
@ -178,19 +178,19 @@ void LabelAtlas::labelAtlasScaleChangedWithSize()
}
}
std::string LabelAtlas::getDescription() const
std::string TextAtlas::getDescription() const
{
return "LabelAtlas";
return "TextAtlas";
}
Widget* LabelAtlas::createCloneInstance()
Widget* TextAtlas::createCloneInstance()
{
return LabelAtlas::create();
return TextAtlas::create();
}
void LabelAtlas::copySpecialProperties(Widget *widget)
void TextAtlas::copySpecialProperties(Widget *widget)
{
LabelAtlas* labelAtlas = dynamic_cast<LabelAtlas*>(widget);
TextAtlas* labelAtlas = dynamic_cast<TextAtlas*>(widget);
if (labelAtlas)
{
setProperty(labelAtlas->_stringValue, labelAtlas->_charMapFileName, labelAtlas->_itemWidth, labelAtlas->_itemHeight, labelAtlas->_startCharMap);

View File

@ -60,23 +60,23 @@ public:
* @js NA
* @lua NA
*/
class LabelAtlas : public Widget
class TextAtlas : public Widget
{
public:
/**
* Default constructor
*/
LabelAtlas();
TextAtlas();
/**
* Default destructor
*/
virtual ~LabelAtlas();
virtual ~TextAtlas();
/**
* Allocates and initializes.
*/
static LabelAtlas* create();
static TextAtlas* create();
/** initializes the LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
void setProperty(const std::string& stringValue,const std::string& charMapFile, int itemWidth, int itemHeight, const std::string& startCharMap);

View File

@ -22,7 +22,7 @@
THE SOFTWARE.
****************************************************************************/
#include "gui/UILabelBMFont.h"
#include "gui/UITextBMFont.h"
NS_CC_BEGIN
@ -30,7 +30,7 @@ namespace gui {
#define LABELBMFONTRENDERERZ (-1)
LabelBMFont::LabelBMFont():
TextBMFont::TextBMFont():
_labelBMFontRenderer(nullptr),
_fntFileHasInit(false),
_fntFileName(""),
@ -38,14 +38,14 @@ _stringValue("")
{
}
LabelBMFont::~LabelBMFont()
TextBMFont::~TextBMFont()
{
}
LabelBMFont* LabelBMFont::create()
TextBMFont* TextBMFont::create()
{
LabelBMFont* widget = new LabelBMFont();
TextBMFont* widget = new TextBMFont();
if (widget && widget->init())
{
widget->autorelease();
@ -55,13 +55,13 @@ LabelBMFont* LabelBMFont::create()
return nullptr;
}
void LabelBMFont::initRenderer()
void TextBMFont::initRenderer()
{
_labelBMFontRenderer = cocos2d::LabelBMFont::create();
Node::addChild(_labelBMFontRenderer, LABELBMFONTRENDERERZ, -1);
}
void LabelBMFont::setFntFile(const char *fileName)
void TextBMFont::setFntFile(const char *fileName)
{
if (!fileName || strcmp(fileName, "") == 0)
{
@ -75,7 +75,7 @@ void LabelBMFont::setFntFile(const char *fileName)
setText(_stringValue.c_str());
}
void LabelBMFont::setText(const char* value)
void TextBMFont::setText(const char* value)
{
if (!value)
{
@ -90,34 +90,34 @@ void LabelBMFont::setText(const char* value)
labelBMFontScaleChangedWithSize();
}
const char* LabelBMFont::getStringValue()
const char* TextBMFont::getStringValue()
{
return _stringValue.c_str();
}
void LabelBMFont::setAnchorPoint(const Point &pt)
void TextBMFont::setAnchorPoint(const Point &pt)
{
Widget::setAnchorPoint(pt);
_labelBMFontRenderer->setAnchorPoint(pt);
}
void LabelBMFont::onSizeChanged()
void TextBMFont::onSizeChanged()
{
Widget::onSizeChanged();
labelBMFontScaleChangedWithSize();
}
const Size& LabelBMFont::getContentSize() const
const Size& TextBMFont::getContentSize() const
{
return _labelBMFontRenderer->getContentSize();
}
Node* LabelBMFont::getVirtualRenderer()
Node* TextBMFont::getVirtualRenderer()
{
return _labelBMFontRenderer;
}
void LabelBMFont::labelBMFontScaleChangedWithSize()
void TextBMFont::labelBMFontScaleChangedWithSize()
{
if (_ignoreSize)
{
@ -139,19 +139,19 @@ void LabelBMFont::labelBMFontScaleChangedWithSize()
}
}
std::string LabelBMFont::getDescription() const
std::string TextBMFont::getDescription() const
{
return "LabelBMFont";
return "TextBMFont";
}
Widget* LabelBMFont::createCloneInstance()
Widget* TextBMFont::createCloneInstance()
{
return LabelBMFont::create();
return TextBMFont::create();
}
void LabelBMFont::copySpecialProperties(Widget *widget)
void TextBMFont::copySpecialProperties(Widget *widget)
{
LabelBMFont* labelBMFont = dynamic_cast<LabelBMFont*>(widget);
TextBMFont* labelBMFont = dynamic_cast<TextBMFont*>(widget);
if (labelBMFont)
{
setFntFile(labelBMFont->_fntFileName.c_str());

View File

@ -35,23 +35,23 @@ namespace gui {
* @js NA
* @lua NA
*/
class LabelBMFont : public Widget
class TextBMFont : public Widget
{
public:
/**
* Default constructor
*/
LabelBMFont();
TextBMFont();
/**
* Default destructor
*/
virtual ~LabelBMFont();
virtual ~TextBMFont();
/**
* Allocates and initializes.
*/
static LabelBMFont* create();
static TextBMFont* create();
/** init a bitmap font atlas with an initial string and the FNT file */
void setFntFile(const char* fileName);

View File

@ -21,7 +21,7 @@ bool UIButtonTest::init()
Size widgetSize = _widget->getSize();
// Add a label in which the button events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("No Event");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -30,7 +30,7 @@ bool UIButtonTest::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Button");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -97,7 +97,7 @@ bool UIButtonTest_Scale9::init()
Size widgetSize = _widget->getSize();
// Add a label in which the button events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("No Event");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -106,7 +106,7 @@ bool UIButtonTest_Scale9::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Button scale9 render");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -172,7 +172,7 @@ bool UIButtonTest_PressedAction::init()
Size widgetSize = _widget->getSize();
// Add a label in which the button events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("No Event");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -181,7 +181,7 @@ bool UIButtonTest_PressedAction::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Button Pressed Action");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -247,7 +247,7 @@ bool UIButtonTest_Title::init()
Size widgetSize = _widget->getSize();
// Add a label in which the text button events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("No Event");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -256,7 +256,7 @@ bool UIButtonTest_Title::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Button with title");
alert->setFontName("Marker Felt");
alert->setFontSize(30);

View File

@ -37,7 +37,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIButtonTest)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
class UIButtonTest_Scale9 : public UIScene
@ -50,7 +50,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIButtonTest_Scale9)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
class UIButtonTest_PressedAction : public UIScene
@ -63,7 +63,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIButtonTest_PressedAction)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
class UIButtonTest_Title : public UIScene
@ -76,7 +76,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIButtonTest_Title)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
#endif /* defined(__TestCpp__UIButtonTest__) */

View File

@ -21,7 +21,7 @@ bool UICheckBoxTest::init()
Size widgetSize = _widget->getSize();;
// Add a label in which the checkbox events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("No Event");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -30,7 +30,7 @@ bool UICheckBoxTest::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("CheckBox");
alert->setFontName("Marker Felt");
alert->setFontSize(30);

View File

@ -37,7 +37,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UICheckBoxTest)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
#endif /* defined(__TestCpp__UICheckBoxTest__) */

View File

@ -11,7 +11,7 @@ bool UIImageViewTest::init()
{
Size widgetSize = _widget->getSize();
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("ImageView");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -72,7 +72,7 @@ bool UIImageViewTest_Scale9::init()
{
Size widgetSize = _widget->getSize();
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("ImageView scale9 render");
alert->setFontName("Marker Felt");
alert->setFontSize(26);

View File

@ -12,7 +12,7 @@ bool UILabelAtlasTest::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("LabelAtlas");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -21,7 +21,7 @@ bool UILabelAtlasTest::init()
_uiLayer->addChild(alert);
// Create the label atlas
gui::LabelAtlas* labelAtlas = gui::LabelAtlas::create();
gui::TextAtlas* labelAtlas = gui::TextAtlas::create();
labelAtlas->setProperty("1234567890", "cocosgui/labelatlas.png", 17, 22, "0");
labelAtlas->setPosition(Point((widgetSize.width) / 2, widgetSize.height / 2.0f));
_uiLayer->addChild(labelAtlas);

View File

@ -11,7 +11,7 @@ bool UILabelBMFontTest::init()
{
Size widgetSize = _widget->getSize();
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("LabelBMFont");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -20,7 +20,7 @@ bool UILabelBMFontTest::init()
_uiLayer->addChild(alert);
// Create the LabelBMFont
gui::LabelBMFont* labelBMFont = gui::LabelBMFont::create();
gui::TextBMFont* labelBMFont = gui::TextBMFont::create();
labelBMFont->setFntFile("cocosgui/bitmapFontTest2.fnt");
labelBMFont->setText("BMFont");
labelBMFont->setPosition(Point(widgetSize.width / 2, widgetSize.height / 2.0f + labelBMFont->getSize().height / 8.0f));

View File

@ -11,7 +11,7 @@ bool UILabelTest::init()
{
Size widgetSize = _widget->getSize();
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Label");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -20,7 +20,7 @@ bool UILabelTest::init()
_uiLayer->addChild(alert);
// Create the label
gui::Label* label = gui::Label::create();
gui::Text* label = gui::Text::create();
label->setText("Label");
label->setFontName("AmericanTypewriter");
label->setFontSize(30);
@ -40,7 +40,7 @@ bool UILabelTest_LineWrap::init()
{
Size widgetSize = _widget->getSize();
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Label line wrap");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -49,7 +49,7 @@ bool UILabelTest_LineWrap::init()
_uiLayer->addChild(alert);
// Create the line wrap
gui::Label* label = gui::Label::create();
gui::Text* label = gui::Text::create();
label->setTextAreaSize(Size(280, 150));
label->setTextHorizontalAlignment(TextHAlignment::CENTER);
label->setText("Label can line wrap");
@ -170,7 +170,7 @@ bool UILabelTest_TTF::init()
{
Size widgetSize = _widget->getSize();
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Label set TTF font");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -179,7 +179,7 @@ bool UILabelTest_TTF::init()
_uiLayer->addChild(alert);
// Create the label
gui::Label* label = gui::Label::create();
gui::Text* label = gui::Text::create();
label->setText("Label");
label->setFontName("fonts/A Damn Mess.ttf");
label->setFontSize(30);

View File

@ -20,7 +20,7 @@ bool UILayoutTest::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Layout");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -86,7 +86,7 @@ bool UILayoutTest_Color::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Layout color render");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -153,7 +153,7 @@ bool UILayoutTest_Gradient::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Layout gradient render");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -220,7 +220,7 @@ bool UILayoutTest_BackGroundImage::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Layout background image");
alert->setFontName("Marker Felt");
alert->setFontSize(20);
@ -287,7 +287,7 @@ bool UILayoutTest_BackGroundImage_Scale9::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Layout background image scale9");
alert->setFontName("Marker Felt");
alert->setFontSize(20);
@ -354,7 +354,7 @@ bool UILayoutTest_Layout_Linear_Vertical::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Layout Linear Vertical");
alert->setFontName("Marker Felt");
alert->setFontSize(20);
@ -439,7 +439,7 @@ bool UILayoutTest_Layout_Linear_Horizontal::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Layout Linear Horizontal");
alert->setFontName("Marker Felt");
alert->setFontSize(20);
@ -524,7 +524,7 @@ bool UILayoutTest_Layout_Relative_Align_Parent::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Layout Relative Align Parent");
alert->setFontName("Marker Felt");
alert->setFontSize(20);
@ -673,7 +673,7 @@ bool UILayoutTest_Layout_Relative_Location::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Layout Relative Location");
alert->setFontName("Marker Felt");
alert->setFontSize(20);

View File

@ -27,7 +27,7 @@ bool UIListViewTest_Vertical::init()
{
Size widgetSize = _widget->getSize();
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("Move by vertical direction");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -36,7 +36,7 @@ bool UIListViewTest_Vertical::init()
_uiLayer->addChild(_displayValueLabel);
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("ListView vertical");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -200,7 +200,7 @@ bool UIListViewTest_Horizontal::init()
{
Size widgetSize = _widget->getSize();
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("Move by horizontal direction");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -209,7 +209,7 @@ bool UIListViewTest_Horizontal::init()
_uiLayer->addChild(_displayValueLabel);
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("ListView horizontal");
alert->setFontName("Marker Felt");
alert->setFontSize(30);

View File

@ -37,7 +37,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIListViewTest_Vertical)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
std::vector<std::string> _array;
};
@ -52,7 +52,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIListViewTest_Horizontal)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
std::vector<std::string> _array;
};

View File

@ -25,7 +25,7 @@ bool UILoadingBarTest_Left::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("LoadingBar left");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -107,7 +107,7 @@ bool UILoadingBarTest_Right::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label *alert = gui::Label::create();
gui::Text *alert = gui::Text::create();
alert->setText("LoadingBar right");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -190,7 +190,7 @@ bool UILoadingBarTest_Left_Scale9::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("LoadingBar left scale9 render");
alert->setFontName("Marker Felt");
alert->setFontSize(20);
@ -275,7 +275,7 @@ bool UILoadingBarTest_Right_Scale9::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label *alert = gui::Label::create();
gui::Text *alert = gui::Text::create();
alert->setText("LoadingBar right scale9 render");
alert->setFontName("Marker Felt");
alert->setFontSize(20);

View File

@ -21,7 +21,7 @@ bool UIPageViewTest::init()
Size widgetSize = _widget->getSize();
// Add a label in which the dragpanel events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("Move by horizontal direction");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -30,7 +30,7 @@ bool UIPageViewTest::init()
_uiLayer->addChild(_displayValueLabel);
// Add the black background
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("PageView");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -65,7 +65,7 @@ bool UIPageViewTest::init()
imageView->setPosition(Point(layout->getSize().width / 2.0f, layout->getSize().height / 2.0f));
layout->addChild(imageView);
gui::Label* label = gui::Label::create();
gui::Text* label = gui::Text::create();
label->setText(CCString::createWithFormat("page %d", (i + 1))->getCString());
label->setFontName("Marker Felt");
label->setFontSize(30);

View File

@ -38,7 +38,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIPageViewTest)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
#endif /* defined(__TestCpp__UIPageViewTest__) */

View File

@ -32,9 +32,9 @@ bool UIScene::init()
Layout* root = static_cast<Layout*>(_uiLayer->getChildByTag(81));
_sceneTitle = dynamic_cast<gui::Label*>(root->getChildByName("UItest"));
_sceneTitle = dynamic_cast<gui::Text*>(root->getChildByName("UItest"));
gui::Label* back_label = dynamic_cast<gui::Label*>(root->getChildByName("back"));
gui::Text* back_label = dynamic_cast<gui::Text*>(root->getChildByName("back"));
back_label->addTouchEventListener(this, toucheventselector(UIScene::toCocosGUITestScene));
Button* left_button = dynamic_cast<Button*>(root->getChildByName("left_Button"));

View File

@ -65,7 +65,7 @@ public:
virtual void nextCallback(Object* sender, TouchEventType type);
/** Title label of the scene. */
CC_SYNTHESIZE_READONLY(gui::Label*, _sceneTitle, SceneTitle)
CC_SYNTHESIZE_READONLY(gui::Text*, _sceneTitle, SceneTitle)
UI_SCENE_CREATE_FUNC(UIScene);

View File

@ -21,7 +21,7 @@ bool UIScrollViewTest_Vertical::init()
Size widgetSize = _widget->getSize();
// Add a label in which the scrollview alert will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("Move by vertical direction");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -30,7 +30,7 @@ bool UIScrollViewTest_Vertical::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("ScrollView vertical");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -109,7 +109,7 @@ bool UIScrollViewTest_Horizontal::init()
Size widgetSize = _widget->getSize();
// Add a label in which the scrollview alert will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("Move by horizontal direction");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -117,7 +117,7 @@ bool UIScrollViewTest_Horizontal::init()
_displayValueLabel->setPosition(Point(widgetSize.width / 2.0f, widgetSize.height / 2.0f + _displayValueLabel->getContentSize().height * 1.5f));
_uiLayer->addChild(_displayValueLabel);
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("ScrollView horizontal");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -203,7 +203,7 @@ bool UIScrollViewTest_Both::init()
Size widgetSize = _widget->getSize();;
// Add a label in which the dragpanel events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("Move by any direction");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -212,7 +212,7 @@ bool UIScrollViewTest_Both::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("ScrollView both");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -272,7 +272,7 @@ bool UIScrollViewTest_ScrollToPercentBothDirection::init()
Size widgetSize = _widget->getSize();
// Add a label in which the dragpanel events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
// _displayValueLabel->setText("No Event");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -281,7 +281,7 @@ bool UIScrollViewTest_ScrollToPercentBothDirection::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("ScrollView scroll to percent both directrion");
alert->setFontName("Marker Felt");
alert->setFontSize(20);
@ -334,7 +334,7 @@ bool UIScrollViewTest_ScrollToPercentBothDirection_Bounce::init()
Size widgetSize = _widget->getSize();
// Add a label in which the dragpanel events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
// _displayValueLabel->setText("No Event");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -343,7 +343,7 @@ bool UIScrollViewTest_ScrollToPercentBothDirection_Bounce::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("ScrollView scroll to percent both directrion bounce");
alert->setFontName("Marker Felt");
alert->setFontSize(20);

View File

@ -36,7 +36,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIScrollViewTest_Vertical)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
class UIScrollViewTest_Horizontal : public UIScene
@ -48,7 +48,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIScrollViewTest_Horizontal)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
class UIScrollViewTest_Both : public UIScene
@ -60,7 +60,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIScrollViewTest_Both)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
class UIScrollViewTest_ScrollToPercentBothDirection : public UIScene
@ -72,7 +72,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIScrollViewTest_ScrollToPercentBothDirection)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
class UIScrollViewTest_ScrollToPercentBothDirection_Bounce : public UIScene
@ -84,7 +84,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UIScrollViewTest_ScrollToPercentBothDirection_Bounce)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
#endif /* defined(__TestCpp__UIScrollViewTest__) */

View File

@ -22,7 +22,7 @@ bool UISliderTest::init()
Size widgetSize = _widget->getSize();
// Add a label in which the slider alert will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("Move the slider thumb");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -31,7 +31,7 @@ bool UISliderTest::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Slider");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -97,7 +97,7 @@ bool UISliderTest_Scale9::init()
Size widgetSize = _widget->getSize();
// Add a label in which the slider alert will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("Move the slider thumb");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -106,7 +106,7 @@ bool UISliderTest_Scale9::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label *alert = gui::Label::create();
gui::Text *alert = gui::Text::create();
alert->setText("Slider scale9 render");
alert->setFontName("Marker Felt");
alert->setFontSize(30);

View File

@ -37,7 +37,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UISliderTest)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
class UISliderTest_Scale9 : public UIScene
@ -50,7 +50,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UISliderTest_Scale9)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
#endif /* defined(__TestCpp__UISliderTest__) */

View File

@ -20,7 +20,7 @@ bool UITextFieldTest::init()
Size widgetSize = _widget->getSize();
// Add a label in which the textfield events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("No Event");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -29,7 +29,7 @@ bool UITextFieldTest::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("TextField");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -106,7 +106,7 @@ bool UITextFieldTest_MaxLength::init()
Size screenSize = CCDirector::getInstance()->getWinSize();
// Add a label in which the textfield events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("No Event");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -115,7 +115,7 @@ bool UITextFieldTest_MaxLength::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label *alert = gui::Label::create();
gui::Text *alert = gui::Text::create();
alert->setText("TextField max length");
alert->setFontName("Marker Felt");
alert->setFontSize(30);
@ -200,7 +200,7 @@ bool UITextFieldTest_Password::init()
Size screenSize = CCDirector::getInstance()->getWinSize();
// Add a label in which the textfield events will be displayed
_displayValueLabel = gui::Label::create();
_displayValueLabel = gui::Text::create();
_displayValueLabel->setText("No Event");
_displayValueLabel->setFontName("Marker Felt");
_displayValueLabel->setFontSize(32);
@ -209,7 +209,7 @@ bool UITextFieldTest_Password::init()
_uiLayer->addChild(_displayValueLabel);
// Add the alert
gui::Label *alert = gui::Label::create();
gui::Text *alert = gui::Text::create();
alert->setText("TextField password");
alert->setFontName("Marker Felt");
alert->setFontSize(30);

View File

@ -37,7 +37,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UITextFieldTest)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
class UITextFieldTest_MaxLength : public UIScene
@ -50,7 +50,7 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UITextFieldTest_MaxLength)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
class UITextFieldTest_Password : public UIScene
@ -63,6 +63,6 @@ public:
protected:
UI_SCENE_CREATE_FUNC(UITextFieldTest_Password)
gui::Label* _displayValueLabel;
gui::Text* _displayValueLabel;
};
#endif /* defined(__TestCpp__UITextFieldTest__) */

View File

@ -21,7 +21,7 @@ bool UIWidgetAddNodeTest::init()
Size widgetSize = _widget->getSize();
// Add the alert
gui::Label* alert = gui::Label::create();
gui::Text* alert = gui::Text::create();
alert->setText("Widget Add Node");
alert->setFontName("Marker Felt");
alert->setFontSize(30);

View File

@ -30,7 +30,7 @@ headers = %(cocosdir)s/cocos/gui/CocosGUI.h
# what classes to produce code for. You can use regular expressions here. When testing the regular
# expression, it will be enclosed in "^$", like this: "^Menu*$".
classes = Helper Layout Widget Layer Button CheckBox ImageView Label LabelAtlas LabelBMFont LoadingBar Slider Switch TextField ScrollView PageView ListView LayoutParameter LinearLayoutParameter RelativeLayoutParameter
classes = Helper Layout Widget Layer Button CheckBox ImageView Text TextAtlas TextBMFont LoadingBar Slider Switch TextField ScrollView PageView ListView LayoutParameter LinearLayoutParameter RelativeLayoutParameter
# what should we skip? in the format ClassName::[function function]
# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also

View File

@ -30,7 +30,7 @@ headers = %(cocosdir)s/cocos/gui/CocosGUI.h %(cocosdir)s/cocos/editor-support/co
# what classes to produce code for. You can use regular expressions here. When testing the regular
# expression, it will be enclosed in "^$", like this: "^Menu*$".
classes = Armature ArmatureAnimation Skin Bone ArmatureDataManager \w+Data$ Widget Layout RootWidget Button CheckBox ImageView Label CCLabelAtlas LabelAtlas LoadingBar ScrollView Slider CCTextField TextField ListView LabelBMFont PageView Helper Layer LayoutParameter GReader LinearLayoutParameter RelativeLayoutParameter SceneReader ActionManagerEx ComAudio ComController ComAttribute ComRender BatchNode
classes = Armature ArmatureAnimation Skin Bone ArmatureDataManager \w+Data$ Widget Layout RootWidget Button CheckBox ImageView Text TextAtlas LoadingBar ScrollView Slider TextField ListView TextBMFont PageView Helper Layer LayoutParameter GReader LinearLayoutParameter RelativeLayoutParameter SceneReader ActionManagerEx ComAudio ComController ComAttribute ComRender BatchNode
# what should we skip? in the format ClassName::[function function]
# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also