2018-01-29 16:25:32 +08:00
|
|
|
/****************************************************************************
|
|
|
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2022-02-24 18:45:25 +08:00
|
|
|
https://adxeproject.github.io/
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2018-01-29 16:25:32 +08:00
|
|
|
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:
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2018-01-29 16:25:32 +08:00
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2018-01-29 16:25:32 +08:00
|
|
|
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.
|
|
|
|
****************************************************************************/
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
#ifndef _ATLAS_TEST_NEW_H_
|
|
|
|
#define _ATLAS_TEST_NEW_H_
|
|
|
|
|
|
|
|
#include "../BaseTest.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "renderer/CCCustomCommand.h"
|
2014-03-11 17:13:54 +08:00
|
|
|
#include "ui/CocosGUI.h"
|
2015-11-19 16:06:13 +08:00
|
|
|
#include "extensions/cocos-ext.h"
|
2020-10-21 10:12:00 +08:00
|
|
|
#include "cocostudio/LocalizationManager.h"
|
2013-08-13 04:29:54 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
DEFINE_TEST_SUITE(NewLabelTests);
|
2013-08-13 04:29:54 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class AtlasDemoNew : public TestCase
|
2021-12-28 16:06:23 +08:00
|
|
|
{};
|
2013-08-13 04:29:54 +08:00
|
|
|
|
|
|
|
class LabelFNTColorAndOpacity : public AtlasDemoNew
|
|
|
|
{
|
2021-12-28 16:06:23 +08:00
|
|
|
float _time;
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTColorAndOpacity);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTColorAndOpacity();
|
|
|
|
|
|
|
|
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-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTSpriteActions : public AtlasDemoNew
|
|
|
|
{
|
2021-12-28 16:06:23 +08:00
|
|
|
float _time;
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTSpriteActions);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTSpriteActions();
|
|
|
|
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-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTPadding : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTPadding);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTPadding();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTOffset : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTOffset);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTOffset();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTColor : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTColor);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTColor();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2015-07-20 11:10:17 +08:00
|
|
|
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTOpacity : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelFNTOpacity);
|
|
|
|
|
|
|
|
LabelFNTOpacity();
|
|
|
|
virtual std::string title() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTHundredLabels : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTHundredLabels);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTHundredLabels();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTMultiLine : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTMultiLine);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTMultiLine();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTandTTFEmpty : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTandTTFEmpty);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTandTTFEmpty();
|
|
|
|
void updateStrings(float dt);
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool setEmpty;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTRetina : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTRetina);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTRetina();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTGlyphDesigner : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTGlyphDesigner);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTGlyphDesigner();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTMultiLineAlignment : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTMultiLineAlignment);
|
|
|
|
|
2018-01-10 17:01:19 +08:00
|
|
|
virtual bool init() override;
|
2013-08-13 04:29:54 +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);
|
2018-01-10 17:01:19 +08:00
|
|
|
void selectAlignmentItem(cocos2d::MenuItemFont* item);
|
|
|
|
void selectSentenceItem(cocos2d::MenuItemFont* item);
|
|
|
|
virtual std::string getItemString(cocos2d::MenuItemFont* item);
|
2013-08-13 04:29:54 +08:00
|
|
|
|
2018-01-10 17:01:19 +08:00
|
|
|
protected:
|
2021-12-28 16:06:23 +08:00
|
|
|
cocos2d::Label* _label = nullptr;
|
2018-01-10 17:01:19 +08:00
|
|
|
cocos2d::Sprite* _arrowsBar = nullptr;
|
2021-12-28 16:06:23 +08:00
|
|
|
cocos2d::Sprite* _arrows = nullptr;
|
2018-01-10 17:01:19 +08:00
|
|
|
std::vector<cocos2d::MenuItemFont*> _menuItems;
|
2021-12-28 16:06:23 +08:00
|
|
|
cocos2d::MenuItemFont* _lastSentenceItem = nullptr;
|
|
|
|
cocos2d::MenuItemFont* _lastAlignmentItem = nullptr;
|
|
|
|
bool _drag = false;
|
2018-01-10 17:01:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTMultiLineAlignmentUNICODE : public LabelFNTMultiLineAlignment
|
|
|
|
{
|
2013-08-13 04:29:54 +08:00
|
|
|
public:
|
2018-01-10 17:01:19 +08:00
|
|
|
CREATE_FUNC(LabelFNTMultiLineAlignmentUNICODE);
|
|
|
|
|
|
|
|
bool init() override;
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
virtual std::string getItemString(cocos2d::MenuItemFont* item) override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTUNICODELanguages : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTUNICODELanguages);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTUNICODELanguages();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTBounds : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFNTBounds);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelFNTBounds();
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
2020-01-06 09:35:52 +08:00
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTMultiFontAtlasNoRotation : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelFNTMultiFontAtlasNoRotation);
|
|
|
|
|
|
|
|
LabelFNTMultiFontAtlasNoRotation();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFNTMultiFontAtlasWithRotation : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelFNTMultiFontAtlasWithRotation);
|
|
|
|
|
|
|
|
LabelFNTMultiFontAtlasWithRotation();
|
|
|
|
virtual std::string title() const override;
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelTTFLongLineWrapping : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelTTFLongLineWrapping);
|
2013-08-13 04:29:54 +08:00
|
|
|
|
|
|
|
LabelTTFLongLineWrapping();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelTTFColor : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelTTFColor);
|
2013-08-13 04:29:54 +08:00
|
|
|
|
|
|
|
LabelTTFColor();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelTTFUnicodeNew : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelTTFUnicodeNew);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelTTFUnicodeNew();
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelTTFDynamicAlignment : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelTTFDynamicAlignment);
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
LabelTTFDynamicAlignment();
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2013-08-13 04:29:54 +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);
|
2013-08-13 04:29:54 +08:00
|
|
|
void updateAlignment();
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Label* _label;
|
2021-12-28 16:06:23 +08:00
|
|
|
cocos2d::TextHAlignment _horizAlign;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
2017-02-06 16:41:52 +08:00
|
|
|
class LabelTTFEmoji : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelTTFEmoji);
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2017-02-06 16:41:52 +08:00
|
|
|
LabelTTFEmoji();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
2013-08-13 04:29:54 +08:00
|
|
|
|
2014-02-08 17:14:38 +08:00
|
|
|
class LabelTTFCJKWrappingTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelTTFCJKWrappingTest);
|
|
|
|
|
|
|
|
LabelTTFCJKWrappingTest();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
class LabelTTFFontsTestNew : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelTTFFontsTestNew);
|
2013-08-13 04:29:54 +08:00
|
|
|
|
|
|
|
LabelTTFFontsTestNew();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelFontDefTestNew : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 09:36:33 +08:00
|
|
|
CREATE_FUNC(LabelFontDefTestNew);
|
2013-08-13 04:29:54 +08:00
|
|
|
|
|
|
|
LabelFontDefTestNew();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-08-13 04:29:54 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
2013-12-13 12:42:15 +08:00
|
|
|
class LabelTTFDistanceField : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelTTFDistanceField);
|
|
|
|
|
|
|
|
LabelTTFDistanceField();
|
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-12-13 12:42:15 +08:00
|
|
|
};
|
|
|
|
|
2014-03-05 15:54:40 +08:00
|
|
|
class LabelOutlineAndGlowTest : public AtlasDemoNew
|
2013-12-13 12:42:15 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-03-05 15:54:40 +08:00
|
|
|
CREATE_FUNC(LabelOutlineAndGlowTest);
|
2013-12-13 12:42:15 +08:00
|
|
|
|
2014-03-05 15:54:40 +08:00
|
|
|
LabelOutlineAndGlowTest();
|
2013-12-13 12:42:15 +08:00
|
|
|
|
2013-12-19 05:52:10 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2013-12-13 12:42:15 +08:00
|
|
|
};
|
2013-08-13 04:29:54 +08:00
|
|
|
|
2014-03-05 15:54:40 +08:00
|
|
|
class LabelShadowTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelShadowTest);
|
|
|
|
|
|
|
|
LabelShadowTest();
|
|
|
|
|
2016-12-16 14:56:36 +08:00
|
|
|
virtual void onEnter() override;
|
2014-03-05 15:54:40 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
2015-04-09 08:37:30 +08:00
|
|
|
void sliderEvent(cocos2d::Ref* sender, cocos2d::ui::Slider::EventType type);
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2014-03-05 15:54:40 +08:00
|
|
|
private:
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Label* shadowLabelOutline;
|
|
|
|
cocos2d::Label* shadowLabelTTF;
|
2016-12-16 14:56:36 +08:00
|
|
|
cocos2d::Label* shadowLabelGrow;
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Label* shadowLabelBMFont;
|
2014-03-05 15:54:40 +08:00
|
|
|
};
|
|
|
|
|
2014-01-16 16:37:29 +08:00
|
|
|
class LabelCharMapTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelCharMapTest);
|
|
|
|
|
|
|
|
LabelCharMapTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
void step(float dt);
|
|
|
|
|
|
|
|
private:
|
2021-12-28 16:06:23 +08:00
|
|
|
float _time;
|
2014-01-16 16:37:29 +08:00
|
|
|
};
|
|
|
|
|
2014-01-24 15:02:42 +08:00
|
|
|
class LabelCharMapColorTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelCharMapColorTest);
|
|
|
|
|
|
|
|
LabelCharMapColorTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
void step(float dt);
|
|
|
|
void actionFinishCallback();
|
|
|
|
|
|
|
|
private:
|
2021-12-28 16:06:23 +08:00
|
|
|
float _time;
|
2014-01-24 15:02:42 +08:00
|
|
|
};
|
|
|
|
|
2014-01-16 14:37:07 +08:00
|
|
|
class LabelCrashTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelCrashTest);
|
|
|
|
|
|
|
|
LabelCrashTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
2013-08-13 04:29:54 +08:00
|
|
|
|
2014-01-23 16:16:30 +08:00
|
|
|
class LabelTTFOldNew : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelTTFOldNew);
|
|
|
|
|
|
|
|
LabelTTFOldNew();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2014-03-10 19:42:43 +08:00
|
|
|
class LabelFontNameTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelFontNameTest);
|
|
|
|
|
|
|
|
LabelFontNameTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2014-03-07 14:58:44 +08:00
|
|
|
class LabelAlignmentTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelAlignmentTest);
|
|
|
|
|
|
|
|
LabelAlignmentTest();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2014-03-07 14:58:44 +08:00
|
|
|
private:
|
2021-12-28 16:06:23 +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);
|
2014-03-07 14:58:44 +08:00
|
|
|
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Label* _label;
|
2014-03-07 14:58:44 +08:00
|
|
|
};
|
|
|
|
|
2014-03-18 10:26:45 +08:00
|
|
|
class LabelIssue4428Test : public AtlasDemoNew
|
2014-03-18 10:20:25 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-03-18 10:26:45 +08:00
|
|
|
CREATE_FUNC(LabelIssue4428Test);
|
2014-03-18 10:20:25 +08:00
|
|
|
|
2014-03-18 10:26:45 +08:00
|
|
|
LabelIssue4428Test();
|
2014-03-18 10:20:25 +08:00
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2014-05-29 14:00:38 +08:00
|
|
|
class LabelIssue4999Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue4999Test);
|
|
|
|
|
|
|
|
LabelIssue4999Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2014-06-18 18:01:55 +08:00
|
|
|
class LabelLineHeightTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelLineHeightTest);
|
|
|
|
|
|
|
|
LabelLineHeightTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
2015-04-09 08:37:30 +08:00
|
|
|
void sliderEvent(cocos2d::Ref* sender, cocos2d::ui::Slider::EventType type);
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2014-06-18 18:01:55 +08:00
|
|
|
private:
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Label* label;
|
2014-06-18 18:01:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LabelAdditionalKerningTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelAdditionalKerningTest);
|
|
|
|
|
|
|
|
LabelAdditionalKerningTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
2015-04-09 08:37:30 +08:00
|
|
|
void sliderEvent(cocos2d::Ref* sender, cocos2d::ui::Slider::EventType type);
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2014-06-18 18:01:55 +08:00
|
|
|
private:
|
2015-04-09 08:37:30 +08:00
|
|
|
cocos2d::Label* label;
|
2014-06-18 18:01:55 +08:00
|
|
|
};
|
|
|
|
|
2014-10-08 18:22:35 +08:00
|
|
|
class LabelIssue8492Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue8492Test);
|
|
|
|
|
|
|
|
LabelIssue8492Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2014-11-12 17:24:35 +08:00
|
|
|
class LabelMultilineWithOutline : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelMultilineWithOutline);
|
|
|
|
|
|
|
|
LabelMultilineWithOutline();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
// we don't support linebreak mode
|
|
|
|
|
2014-11-27 11:03:11 +08:00
|
|
|
class LabelIssue9255Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue9255Test);
|
|
|
|
|
|
|
|
LabelIssue9255Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-01-09 18:51:30 +08:00
|
|
|
class LabelSmallDimensionsTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelSmallDimensionsTest);
|
|
|
|
|
|
|
|
LabelSmallDimensionsTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-01-20 12:01:51 +08:00
|
|
|
class LabelIssue10089Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue10089Test);
|
|
|
|
|
|
|
|
LabelIssue10089Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-01-20 16:50:50 +08:00
|
|
|
class LabelSystemFontColor : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelSystemFontColor);
|
|
|
|
|
|
|
|
LabelSystemFontColor();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
2014-11-27 11:03:11 +08:00
|
|
|
|
2015-04-30 16:11:59 +08:00
|
|
|
class LabelIssue10773Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue10773Test);
|
|
|
|
|
|
|
|
LabelIssue10773Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-05-07 11:48:55 +08:00
|
|
|
class LabelIssue11576Test : public AtlasDemoNew
|
2015-05-04 10:09:14 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-05-07 11:48:55 +08:00
|
|
|
CREATE_FUNC(LabelIssue11576Test);
|
2015-05-04 10:09:14 +08:00
|
|
|
|
2015-05-07 11:48:55 +08:00
|
|
|
LabelIssue11576Test();
|
2015-05-04 10:09:14 +08:00
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-05-06 17:17:30 +08:00
|
|
|
class LabelIssue11699Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue11699Test);
|
|
|
|
|
|
|
|
LabelIssue11699Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-06-19 13:39:19 +08:00
|
|
|
class LabelIssue12409Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue12409Test);
|
|
|
|
|
|
|
|
LabelIssue12409Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-07-07 15:41:54 +08:00
|
|
|
class LabelAddChildTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelAddChildTest);
|
|
|
|
|
|
|
|
LabelAddChildTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
};
|
|
|
|
|
2015-07-13 15:38:33 +08:00
|
|
|
class LabelIssue12775Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue12775Test);
|
|
|
|
|
|
|
|
LabelIssue12775Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-07-15 20:17:05 +08:00
|
|
|
class LabelIssue11585Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue11585Test);
|
|
|
|
|
|
|
|
LabelIssue11585Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-07-29 16:30:07 +08:00
|
|
|
class LabelIssue10688Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue10688Test);
|
|
|
|
|
|
|
|
LabelIssue10688Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-08-05 14:12:02 +08:00
|
|
|
class LabelIssue13202Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue13202Test);
|
|
|
|
|
|
|
|
LabelIssue13202Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-08-05 23:46:41 +08:00
|
|
|
class LabelIssue9500Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue9500Test);
|
|
|
|
|
|
|
|
LabelIssue9500Test();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-11-19 16:06:13 +08:00
|
|
|
class LabelLayoutBaseTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LabelLayoutBaseTest();
|
2021-12-28 16:06:23 +08:00
|
|
|
void updateDrawNodeSize(const cocos2d::Size& drawNodeSize);
|
2015-11-19 16:06:13 +08:00
|
|
|
cocos2d::extension::ControlStepper* makeControlStepper();
|
|
|
|
void valueChanged(cocos2d::Ref* sender, cocos2d::extension::Control::EventType controlEvent);
|
|
|
|
|
|
|
|
protected:
|
2021-12-28 16:06:23 +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);
|
|
|
|
|
2015-11-19 16:06:13 +08:00
|
|
|
void initWrapOption(const cocos2d::Size& size);
|
|
|
|
void initToggleLabelTypeOption(const cocos2d::Size& size);
|
|
|
|
void initAlignmentOption(const cocos2d::Size& size);
|
|
|
|
void initFontSizeChange(const cocos2d::Size& size);
|
|
|
|
void initSliders(const cocos2d::Size& size);
|
|
|
|
void initTestLabel(const cocos2d::Size& size);
|
|
|
|
void initDrawNode(const cocos2d::Size& size);
|
|
|
|
cocos2d::DrawNode* _drawNode;
|
|
|
|
cocos2d::Label* _label;
|
|
|
|
int _labelType;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelWrapByWordTest : public LabelLayoutBaseTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelWrapByWordTest);
|
|
|
|
|
|
|
|
LabelWrapByWordTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelWrapByCharTest : public LabelLayoutBaseTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelWrapByCharTest);
|
|
|
|
|
|
|
|
LabelWrapByCharTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2018-03-13 09:40:24 +08:00
|
|
|
class LabelWrapNoBreakSpaceTest : public LabelLayoutBaseTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelWrapNoBreakSpaceTest);
|
|
|
|
|
|
|
|
LabelWrapNoBreakSpaceTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2015-11-19 16:06:13 +08:00
|
|
|
class LabelShrinkByWordTest : public LabelLayoutBaseTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelShrinkByWordTest);
|
|
|
|
|
|
|
|
LabelShrinkByWordTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelShrinkByCharTest : public LabelLayoutBaseTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelShrinkByCharTest);
|
|
|
|
|
|
|
|
LabelShrinkByCharTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelResizeTest : public LabelLayoutBaseTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelResizeTest);
|
|
|
|
|
|
|
|
LabelResizeTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelToggleTypeTest : public LabelLayoutBaseTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelToggleTypeTest);
|
|
|
|
|
|
|
|
LabelToggleTypeTest();
|
|
|
|
void initToggleCheckboxes();
|
2021-12-28 16:06:23 +08:00
|
|
|
void onChangedRadioButtonSelect(cocos2d::ui::RadioButton* radioButton, cocos2d::ui::RadioButton::EventType type);
|
2015-11-19 16:06:13 +08:00
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelSystemFontTest : public LabelLayoutBaseTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelSystemFontTest);
|
|
|
|
|
|
|
|
LabelSystemFontTest();
|
|
|
|
void initToggleCheckboxes();
|
2021-12-28 16:06:23 +08:00
|
|
|
void onChangedRadioButtonSelect(cocos2d::ui::RadioButton* radioButton, cocos2d::ui::RadioButton::EventType type);
|
2015-11-19 16:06:13 +08:00
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2016-06-15 10:43:15 +08:00
|
|
|
class LabelCharMapFontTest : public LabelLayoutBaseTest
|
2015-11-19 16:06:13 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelCharMapFontTest);
|
|
|
|
|
|
|
|
LabelCharMapFontTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
2015-12-16 14:59:33 +08:00
|
|
|
|
|
|
|
class LabelIssue13846Test : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue13846Test);
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2015-12-16 14:59:33 +08:00
|
|
|
LabelIssue13846Test();
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2015-12-16 14:59:33 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2016-01-20 12:41:31 +08:00
|
|
|
class LabelRichText : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelRichText);
|
|
|
|
|
|
|
|
LabelRichText();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelItalics : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelItalics);
|
|
|
|
|
|
|
|
LabelItalics();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
cocos2d::Label* _label1a;
|
|
|
|
cocos2d::Label* _label2a;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelBold : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelBold);
|
|
|
|
|
|
|
|
LabelBold();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
cocos2d::Label* _label1a;
|
|
|
|
cocos2d::Label* _label2a;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelUnderline : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelUnderline);
|
|
|
|
|
|
|
|
LabelUnderline();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
cocos2d::Label* _label1a;
|
|
|
|
cocos2d::Label* _label2a;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelUnderlineMultiline : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelUnderlineMultiline);
|
|
|
|
|
|
|
|
LabelUnderlineMultiline();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
cocos2d::Label* _label1a;
|
|
|
|
cocos2d::Label* _label2a;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LabelStrikethrough : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelStrikethrough);
|
|
|
|
|
|
|
|
LabelStrikethrough();
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
cocos2d::Label* _label1a;
|
|
|
|
cocos2d::Label* _label2a;
|
|
|
|
};
|
|
|
|
|
2016-02-26 17:15:24 +08:00
|
|
|
class LabelLocalizationTest : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelLocalizationTest);
|
|
|
|
|
|
|
|
LabelLocalizationTest();
|
|
|
|
void onChangedRadioButtonSelect(cocos2d::ui::RadioButton* radioButton, cocos2d::ui::RadioButton::EventType type);
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
cocos2d::Label* _label1;
|
|
|
|
cocos2d::Label* _label2;
|
2016-03-03 16:19:16 +08:00
|
|
|
cocostudio::ILocalizationManager* _localizationJson;
|
|
|
|
cocostudio::ILocalizationManager* _localizationBin;
|
2016-02-26 17:15:24 +08:00
|
|
|
};
|
|
|
|
|
2016-06-18 08:23:59 +08:00
|
|
|
class LabelIssue15214 : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue15214);
|
|
|
|
|
|
|
|
LabelIssue15214();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
2016-08-14 00:38:42 +08:00
|
|
|
|
|
|
|
class LabelIssue16293 : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue16293);
|
|
|
|
|
|
|
|
LabelIssue16293();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2016-09-01 11:20:13 +08:00
|
|
|
class LabelIssue16471 : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue16471);
|
|
|
|
|
|
|
|
LabelIssue16471();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2016-12-16 14:56:36 +08:00
|
|
|
class LabelIssue16717 : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue16717);
|
|
|
|
|
|
|
|
LabelIssue16717();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2017-02-13 13:58:32 +08:00
|
|
|
class LabelIssueLineGap : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssueLineGap);
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2017-02-13 13:58:32 +08:00
|
|
|
LabelIssueLineGap();
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2017-02-13 13:58:32 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2017-06-07 16:56:02 +08:00
|
|
|
class LabelIssue17902 : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue17902);
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2017-06-07 16:56:02 +08:00
|
|
|
LabelIssue17902();
|
|
|
|
|
|
|
|
virtual void purgeCachedData();
|
2021-12-28 16:06:23 +08:00
|
|
|
|
2017-06-07 16:56:02 +08:00
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
};
|
|
|
|
|
2020-09-17 11:49:47 +08:00
|
|
|
class LabelIssue20523 : public AtlasDemoNew
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelIssue20523);
|
|
|
|
|
|
|
|
LabelIssue20523();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
int _i = 0;
|
|
|
|
};
|
|
|
|
|
2021-12-28 16:06:23 +08:00
|
|
|
class LabelLetterColorsTest : public AtlasDemoNew
|
|
|
|
{
|
2018-08-06 14:27:47 +08:00
|
|
|
public:
|
|
|
|
CREATE_FUNC(LabelLetterColorsTest);
|
|
|
|
|
|
|
|
LabelLetterColorsTest();
|
|
|
|
|
|
|
|
virtual std::string title() const override;
|
|
|
|
virtual std::string subtitle() const override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void setLetterColors(cocos2d::Label* label, const cocos2d::Color3B& color);
|
|
|
|
};
|
|
|
|
|
2013-08-13 04:29:54 +08:00
|
|
|
#endif
|