2018-01-29 16:25:32 +08:00
|
|
|
/****************************************************************************
|
|
|
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
|
|
|
|
|
|
|
http://www.cocos2d-x.org
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
THE SOFTWARE.
|
|
|
|
****************************************************************************/
|
|
|
|
|
2010-09-07 11:47:54 +08:00
|
|
|
#ifndef _ATLAS_TEST_H_
|
|
|
|
#define _ATLAS_TEST_H_
|
|
|
|
|
2013-06-07 08:12:28 +08:00
|
|
|
#include "../BaseTest.h"
|
2010-09-07 11:47:54 +08:00
|
|
|
|
2014-03-31 17:31:04 +08:00
|
|
|
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
|
|
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
#elif _MSC_VER >= 1400 //vs 2005 or higher
|
|
|
|
#pragma warning (push)
|
|
|
|
#pragma warning (disable: 4996)
|
|
|
|
#endif
|
2013-07-12 05:41:03 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
DEFINE_TEST_SUITE(LabelTests);
|
2010-09-07 11:47:54 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class AtlasDemo : public TestCase
|
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
2010-09-07 11:47:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class Atlas1 : public AtlasDemo
|
|
|
|
{
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::TextureAtlas* _textureAtlas;
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(Atlas1);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
Atlas1();
|
|
|
|
~Atlas1();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2015-04-09 08:37:30 +08:00
|
|
|
virtual void draw(cocos2d::Renderer* renderer, const cocos2d::Mat4& transform, uint32_t flags) override;
|
2013-12-25 14:52:49 +08:00
|
|
|
protected:
|
2015-04-09 08:37:30 +08:00
|
|
|
void onDraw(const cocos2d::Mat4& transform, uint32_t flags);
|
2013-12-26 21:19:12 +08:00
|
|
|
protected:
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::CustomCommand _customCommand;
|
2010-09-07 11:47:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelAtlasTest : public AtlasDemo
|
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
float _time;
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelAtlasTest);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
LabelAtlasTest();
|
2010-09-07 11:47:54 +08:00
|
|
|
|
2012-06-08 13:55:28 +08:00
|
|
|
virtual void step(float dt);
|
2010-09-07 11:47:54 +08:00
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2010-09-07 11:47:54 +08:00
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class LabelAtlasColorTest : public AtlasDemo
|
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
float _time;
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelAtlasColorTest);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
LabelAtlasColorTest();
|
2012-06-08 13:55:28 +08:00
|
|
|
virtual void step(float dt);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-02-28 15:57:15 +08:00
|
|
|
void actionFinishCallback();
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
2010-09-07 11:47:54 +08:00
|
|
|
|
2012-06-12 14:33:53 +08:00
|
|
|
class LabelTTFAlignment : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelTTFAlignment);
|
|
|
|
|
2012-06-12 14:33:53 +08:00
|
|
|
LabelTTFAlignment();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-06-12 14:33:53 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-09-07 11:47:54 +08:00
|
|
|
class Atlas3 : public AtlasDemo
|
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
float _time;
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(Atlas3);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
Atlas3();
|
2010-09-07 11:47:54 +08:00
|
|
|
|
2012-06-08 13:55:28 +08:00
|
|
|
virtual void step(float dt);
|
2010-09-07 11:47:54 +08:00
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2010-09-07 11:47:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class Atlas4 : public AtlasDemo
|
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
float _time;
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(Atlas4);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
Atlas4();
|
2012-06-08 13:55:28 +08:00
|
|
|
virtual void step(float dt);
|
2010-09-07 11:47:54 +08:00
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2010-09-07 11:47:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class Atlas5 : public AtlasDemo
|
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(Atlas5);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
Atlas5();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2010-09-07 11:47:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class Atlas6 : public AtlasDemo
|
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(Atlas6);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
Atlas6();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2010-09-07 11:47:54 +08:00
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class AtlasBitmapColor : public AtlasDemo
|
2010-09-07 11:47:54 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(AtlasBitmapColor);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
AtlasBitmapColor();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2010-09-07 11:47:54 +08:00
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string subtitle() const override;
|
2010-09-07 11:47:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class AtlasFastBitmap : public AtlasDemo
|
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(AtlasFastBitmap);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
AtlasFastBitmap();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2010-09-07 11:47:54 +08:00
|
|
|
};
|
|
|
|
|
2011-02-23 16:47:25 +08:00
|
|
|
class BitmapFontMultiLine : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(BitmapFontMultiLine);
|
|
|
|
|
2011-02-23 16:47:25 +08:00
|
|
|
BitmapFontMultiLine();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2011-02-23 16:47:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelsEmpty : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelsEmpty);
|
|
|
|
|
2011-02-23 16:47:25 +08:00
|
|
|
LabelsEmpty();
|
2012-06-08 13:55:28 +08:00
|
|
|
void updateStrings(float dt);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2011-02-23 16:47:25 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool setEmpty;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelBMFontHD : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelBMFontHD);
|
|
|
|
|
2011-02-23 16:47:25 +08:00
|
|
|
LabelBMFontHD();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2011-02-23 16:47:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelAtlasHD : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelAtlasHD);
|
|
|
|
|
2011-02-23 16:47:25 +08:00
|
|
|
LabelAtlasHD();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2011-02-23 16:47:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelGlyphDesigner : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelGlyphDesigner);
|
|
|
|
|
2011-02-23 16:47:25 +08:00
|
|
|
LabelGlyphDesigner();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2011-02-23 16:47:25 +08:00
|
|
|
};
|
|
|
|
|
2011-07-06 14:56:05 +08:00
|
|
|
class LabelTTFTest : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelTTFTest);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
LabelTTFTest();
|
2012-06-12 14:33:53 +08:00
|
|
|
virtual ~LabelTTFTest();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-06-12 14:33:53 +08:00
|
|
|
private:
|
2015-04-09 08:37:30 +08:00
|
|
|
void setAlignmentLeft(cocos2d::Ref* sender);
|
|
|
|
void setAlignmentCenter(cocos2d::Ref* sender);
|
|
|
|
void setAlignmentRight(cocos2d::Ref* sender);
|
|
|
|
void setAlignmentTop(cocos2d::Ref* sender);
|
|
|
|
void setAlignmentMiddle(cocos2d::Ref* sender);
|
|
|
|
void setAlignmentBottom(cocos2d::Ref* sender);
|
2012-11-20 18:17:47 +08:00
|
|
|
void updateAlignment();
|
2012-06-12 14:33:53 +08:00
|
|
|
const char* getCurrentAlignment();
|
|
|
|
private:
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::TextHAlignment _horizAlign;
|
|
|
|
cocos2d::LabelTTF* _label;
|
|
|
|
cocos2d::TextVAlignment _vertAlign;
|
2011-07-06 14:56:05 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelTTFMultiline : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelTTFMultiline);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
LabelTTFMultiline();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2011-07-06 14:56:05 +08:00
|
|
|
};
|
|
|
|
|
2011-08-18 18:40:24 +08:00
|
|
|
class LabelTTFChinese : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelTTFChinese);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
LabelTTFChinese();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2011-08-18 18:40:24 +08:00
|
|
|
};
|
|
|
|
|
2012-01-18 18:43:41 +08:00
|
|
|
class LabelBMFontChinese : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelBMFontChinese);
|
|
|
|
|
2012-01-18 18:43:41 +08:00
|
|
|
LabelBMFontChinese();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2012-01-18 18:43:41 +08:00
|
|
|
};
|
|
|
|
|
2012-03-22 09:40:32 +08:00
|
|
|
class BitmapFontMultiLineAlignment : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(BitmapFontMultiLineAlignment);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
BitmapFontMultiLineAlignment();
|
|
|
|
~BitmapFontMultiLineAlignment();
|
2012-03-22 09:40:32 +08:00
|
|
|
void snapArrowsToEdge();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2015-04-09 08:37:30 +08:00
|
|
|
void stringChanged(cocos2d::Ref* sender);
|
|
|
|
void alignmentChanged(cocos2d::Ref* sender);
|
|
|
|
void onTouchesBegan(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
|
|
|
|
void onTouchesEnded(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
|
|
|
|
void onTouchesMoved(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
|
2012-03-22 09:40:32 +08:00
|
|
|
|
|
|
|
public:
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::LabelBMFont* _labelShouldRetain;
|
|
|
|
cocos2d::Sprite* _arrowsBarShouldRetain;
|
|
|
|
cocos2d::Sprite* _arrowsShouldRetain;
|
|
|
|
cocos2d::MenuItemFont *_lastSentenceItem, *_lastAlignmentItem;
|
2013-06-15 14:03:30 +08:00
|
|
|
bool _drag;
|
2012-03-22 09:40:32 +08:00
|
|
|
};
|
|
|
|
|
2014-10-20 14:58:15 +08:00
|
|
|
class LabelTTFOpacityTest : public AtlasDemo
|
2012-03-22 11:48:37 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-10-20 14:58:15 +08:00
|
|
|
CREATE_FUNC(LabelTTFOpacityTest);
|
2013-11-14 09:36:33 +08:00
|
|
|
|
2014-10-20 14:58:15 +08:00
|
|
|
LabelTTFOpacityTest();
|
2012-03-22 11:48:37 +08:00
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-03-22 11:48:37 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class BMFontOneAtlas : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(BMFontOneAtlas);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
BMFontOneAtlas();
|
2012-03-22 11:48:37 +08:00
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-03-22 11:48:37 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class BMFontUnicode : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(BMFontUnicode);
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
BMFontUnicode();
|
2012-03-22 11:48:37 +08:00
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-03-22 11:48:37 +08:00
|
|
|
};
|
|
|
|
|
2012-06-12 14:33:53 +08:00
|
|
|
class BMFontInit : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(BMFontInit);
|
|
|
|
|
2012-06-12 14:33:53 +08:00
|
|
|
BMFontInit();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-06-12 14:33:53 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class TTFFontInit : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(TTFFontInit);
|
|
|
|
|
2012-06-12 14:33:53 +08:00
|
|
|
TTFFontInit();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-06-12 14:33:53 +08:00
|
|
|
};
|
|
|
|
|
2013-04-26 09:22:26 +08:00
|
|
|
class TTFFontShadowAndStroke : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(TTFFontShadowAndStroke);
|
|
|
|
|
2013-04-26 09:22:26 +08:00
|
|
|
TTFFontShadowAndStroke();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-04-26 09:22:26 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-06-12 14:33:53 +08:00
|
|
|
class Issue1343 : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(Issue1343);
|
|
|
|
|
2012-06-12 14:33:53 +08:00
|
|
|
Issue1343();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-06-12 14:33:53 +08:00
|
|
|
};
|
|
|
|
|
2012-11-20 18:17:47 +08:00
|
|
|
class LabelBMFontBounds : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelBMFontBounds);
|
|
|
|
|
2012-11-20 18:17:47 +08:00
|
|
|
LabelBMFontBounds();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2012-11-20 18:17:47 +08:00
|
|
|
};
|
|
|
|
|
2013-07-31 07:41:26 +08:00
|
|
|
class NewLabelTTFUnicode : public AtlasDemo
|
2013-07-25 08:21:51 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(NewLabelTTFUnicode);
|
|
|
|
|
2013-07-31 07:41:26 +08:00
|
|
|
NewLabelTTFUnicode();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-07-25 08:21:51 +08:00
|
|
|
};
|
|
|
|
|
2013-07-20 07:04:23 +08:00
|
|
|
class NewLabelBMFontTest : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(NewLabelBMFontTest);
|
2013-07-20 07:04:23 +08:00
|
|
|
|
|
|
|
NewLabelBMFontTest();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-07-20 07:04:23 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
class NewLabelFontDefTest : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(NewLabelFontDefTest);
|
2013-07-20 07:04:23 +08:00
|
|
|
|
|
|
|
NewLabelFontDefTest();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-07-20 07:04:23 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
2013-08-21 14:56:43 +08:00
|
|
|
class LabelBMFontCrashTest : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelBMFontCrashTest);
|
|
|
|
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onEnter() override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-21 14:56:43 +08:00
|
|
|
};
|
2013-07-12 05:41:03 +08:00
|
|
|
|
2013-12-29 03:00:07 +08:00
|
|
|
class LabelBMFontBinaryFormat : public AtlasDemo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelBMFontBinaryFormat);
|
|
|
|
|
|
|
|
LabelBMFontBinaryFormat();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2014-03-31 17:31:04 +08:00
|
|
|
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
|
|
|
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
|
|
|
|
#elif _MSC_VER >= 1400 //vs 2005 or higher
|
|
|
|
#pragma warning (pop)
|
|
|
|
#endif
|
2013-07-12 05:41:03 +08:00
|
|
|
|
2011-07-06 14:56:05 +08:00
|
|
|
// we don't support linebreak mode
|
|
|
|
|
2010-09-07 11:47:54 +08:00
|
|
|
#endif
|