axmol/tests/cpp-tests/Source/LabelTest/LabelTestNew.h

1034 lines
23 KiB
C
Raw Normal View History

2019-11-23 20:27:39 +08:00
/****************************************************************************
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
2022-10-01 16:24:52 +08:00
https://axmolengine.github.io/
2019-11-23 20:27:39 +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:
2019-11-23 20:27:39 +08:00
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
2019-11-23 20:27:39 +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.
****************************************************************************/
#ifndef _ATLAS_TEST_NEW_H_
#define _ATLAS_TEST_NEW_H_
#include "../BaseTest.h"
#include "renderer/CCCustomCommand.h"
#include "ui/CocosGUI.h"
2023-03-14 07:56:07 +08:00
#include "extensions/axmol-ext.h"
#include "cocostudio/LocalizationManager.h"
2019-11-23 20:27:39 +08:00
DEFINE_TEST_SUITE(NewLabelTests);
class AtlasDemoNew : public TestCase
{};
2019-11-23 20:27:39 +08:00
class LabelFNTColorAndOpacity : public AtlasDemoNew
{
float _time;
2019-11-23 20:27:39 +08:00
public:
CREATE_FUNC(LabelFNTColorAndOpacity);
LabelFNTColorAndOpacity();
virtual void step(float dt);
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFNTSpriteActions : public AtlasDemoNew
{
float _time;
2019-11-23 20:27:39 +08:00
public:
CREATE_FUNC(LabelFNTSpriteActions);
LabelFNTSpriteActions();
virtual void step(float dt);
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFNTPadding : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTPadding);
LabelFNTPadding();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFNTOffset : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTOffset);
LabelFNTOffset();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFNTColor : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTColor);
LabelFNTColor();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFNTOpacity : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTOpacity);
LabelFNTOpacity();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFNTHundredLabels : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTHundredLabels);
LabelFNTHundredLabels();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFNTMultiLine : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTMultiLine);
LabelFNTMultiLine();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFNTandTTFEmpty : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTandTTFEmpty);
LabelFNTandTTFEmpty();
void updateStrings(float dt);
virtual std::string title() const override;
virtual std::string subtitle() const override;
private:
bool setEmpty;
};
class LabelFNTRetina : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTRetina);
LabelFNTRetina();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFNTGlyphDesigner : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTGlyphDesigner);
LabelFNTGlyphDesigner();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFNTMultiLineAlignment : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTMultiLineAlignment);
virtual bool init() override;
void snapArrowsToEdge();
virtual std::string title() const override;
virtual std::string subtitle() const override;
2022-10-18 19:17:36 +08:00
void stringChanged(ax::Ref* sender);
void alignmentChanged(ax::Ref* sender);
void onTouchesBegan(const std::vector<ax::Touch*>& touches, ax::Event* event);
void onTouchesEnded(const std::vector<ax::Touch*>& touches, ax::Event* event);
void onTouchesMoved(const std::vector<ax::Touch*>& touches, ax::Event* event);
void selectAlignmentItem(ax::MenuItemFont* item);
void selectSentenceItem(ax::MenuItemFont* item);
virtual std::string getItemString(ax::MenuItemFont* item);
2019-11-23 20:27:39 +08:00
protected:
2022-10-18 19:17:36 +08:00
ax::Label* _label = nullptr;
ax::Sprite* _arrowsBar = nullptr;
ax::Sprite* _arrows = nullptr;
std::vector<ax::MenuItemFont*> _menuItems;
ax::MenuItemFont* _lastSentenceItem = nullptr;
ax::MenuItemFont* _lastAlignmentItem = nullptr;
bool _drag = false;
2019-11-23 20:27:39 +08:00
};
class LabelFNTMultiLineAlignmentUNICODE : public LabelFNTMultiLineAlignment
{
public:
CREATE_FUNC(LabelFNTMultiLineAlignmentUNICODE);
bool init() override;
virtual std::string title() const override;
virtual std::string subtitle() const override;
2022-10-18 19:17:36 +08:00
virtual std::string getItemString(ax::MenuItemFont* item) override;
2019-11-23 20:27:39 +08:00
};
class LabelFNTUNICODELanguages : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTUNICODELanguages);
LabelFNTUNICODELanguages();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFNTBounds : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFNTBounds);
LabelFNTBounds();
2019-11-23 20:27:39 +08:00
virtual std::string title() const override;
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;
2019-11-23 20:27:39 +08:00
virtual std::string subtitle() const override;
};
class LabelTTFLongLineWrapping : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelTTFLongLineWrapping);
LabelTTFLongLineWrapping();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelTTFColor : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelTTFColor);
LabelTTFColor();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelTTFUnicodeNew : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelTTFUnicodeNew);
LabelTTFUnicodeNew();
2019-11-23 20:27:39 +08:00
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelTTFDynamicAlignment : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelTTFDynamicAlignment);
LabelTTFDynamicAlignment();
virtual std::string title() const override;
virtual std::string subtitle() const override;
2019-11-23 20:27:39 +08:00
private:
2022-10-18 19:17:36 +08:00
void setAlignmentLeft(ax::Ref* sender);
void setAlignmentCenter(ax::Ref* sender);
void setAlignmentRight(ax::Ref* sender);
2019-11-23 20:27:39 +08:00
void updateAlignment();
2022-10-18 19:17:36 +08:00
ax::Label* _label;
ax::TextHAlignment _horizAlign;
2019-11-23 20:27:39 +08:00
};
class LabelTTFEmoji : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelTTFEmoji);
2019-11-23 20:27:39 +08:00
LabelTTFEmoji();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelTTFCJKWrappingTest : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelTTFCJKWrappingTest);
LabelTTFCJKWrappingTest();
virtual std::string title() const override;
virtual std::string subtitle() const override;
private:
};
class LabelTTFFontsTestNew : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelTTFFontsTestNew);
LabelTTFFontsTestNew();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFontDefTestNew : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFontDefTestNew);
LabelFontDefTestNew();
virtual std::string title() const override;
virtual std::string subtitle() const override;
private:
};
class LabelTTFDistanceField : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelTTFDistanceField);
LabelTTFDistanceField();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelOutlineAndGlowTest : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelOutlineAndGlowTest);
LabelOutlineAndGlowTest();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelShadowTest : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelShadowTest);
LabelShadowTest();
virtual void onEnter() override;
virtual std::string title() const override;
virtual std::string subtitle() const override;
2022-10-18 19:17:36 +08:00
void sliderEvent(ax::Ref* sender, ax::ui::Slider::EventType type);
2019-11-23 20:27:39 +08:00
private:
2022-10-18 19:17:36 +08:00
ax::Label* shadowLabelOutline;
ax::Label* shadowLabelTTF;
ax::Label* shadowLabelGrow;
ax::Label* shadowLabelBMFont;
2019-11-23 20:27:39 +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:
float _time;
2019-11-23 20:27:39 +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:
float _time;
2019-11-23 20:27:39 +08:00
};
class LabelCrashTest : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelCrashTest);
LabelCrashTest();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelTTFOldNew : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelTTFOldNew);
LabelTTFOldNew();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelFontNameTest : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelFontNameTest);
LabelFontNameTest();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelAlignmentTest : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelAlignmentTest);
LabelAlignmentTest();
virtual std::string title() const override;
virtual std::string subtitle() const override;
2019-11-23 20:27:39 +08:00
private:
2022-10-18 19:17:36 +08:00
void setAlignmentLeft(ax::Ref* sender);
void setAlignmentCenter(ax::Ref* sender);
void setAlignmentRight(ax::Ref* sender);
void setAlignmentTop(ax::Ref* sender);
void setAlignmentMiddle(ax::Ref* sender);
void setAlignmentBottom(ax::Ref* sender);
2019-11-23 20:27:39 +08:00
2022-10-18 19:17:36 +08:00
ax::Label* _label;
2019-11-23 20:27:39 +08:00
};
class LabelIssue4428Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue4428Test);
LabelIssue4428Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue4999Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue4999Test);
LabelIssue4999Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelLineHeightTest : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelLineHeightTest);
LabelLineHeightTest();
virtual std::string title() const override;
virtual std::string subtitle() const override;
2022-10-18 19:17:36 +08:00
void sliderEvent(ax::Ref* sender, ax::ui::Slider::EventType type);
2019-11-23 20:27:39 +08:00
private:
2022-10-18 19:17:36 +08:00
ax::Label* label;
2019-11-23 20:27:39 +08:00
};
class LabelAdditionalKerningTest : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelAdditionalKerningTest);
LabelAdditionalKerningTest();
virtual std::string title() const override;
virtual std::string subtitle() const override;
2022-10-18 19:17:36 +08:00
void sliderEvent(ax::Ref* sender, ax::ui::Slider::EventType type);
2019-11-23 20:27:39 +08:00
private:
2022-10-18 19:17:36 +08:00
ax::Label* label;
2019-11-23 20:27:39 +08:00
};
class LabelIssue8492Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue8492Test);
LabelIssue8492Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelMultilineWithOutline : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelMultilineWithOutline);
LabelMultilineWithOutline();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
// we don't support linebreak mode
class LabelIssue9255Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue9255Test);
LabelIssue9255Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelSmallDimensionsTest : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelSmallDimensionsTest);
LabelSmallDimensionsTest();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue10089Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue10089Test);
LabelIssue10089Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelSystemFontColor : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelSystemFontColor);
LabelSystemFontColor();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue10773Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue10773Test);
LabelIssue10773Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue11576Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue11576Test);
LabelIssue11576Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue11699Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue11699Test);
LabelIssue11699Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue12409Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue12409Test);
LabelIssue12409Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelAddChildTest : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelAddChildTest);
LabelAddChildTest();
virtual std::string title() const override;
};
class LabelIssue12775Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue12775Test);
LabelIssue12775Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue11585Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue11585Test);
LabelIssue11585Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue10688Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue10688Test);
LabelIssue10688Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue13202Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue13202Test);
LabelIssue13202Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue9500Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue9500Test);
LabelIssue9500Test();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelLayoutBaseTest : public AtlasDemoNew
{
public:
LabelLayoutBaseTest();
2022-10-18 19:17:36 +08:00
void updateDrawNodeSize(const ax::Size& drawNodeSize);
ax::extension::ControlStepper* makeControlStepper();
void valueChanged(ax::Ref* sender, ax::extension::Control::EventType controlEvent);
2019-11-23 20:27:39 +08:00
protected:
2022-10-18 19:17:36 +08:00
void setAlignmentLeft(ax::Ref* sender);
void setAlignmentCenter(ax::Ref* sender);
void setAlignmentRight(ax::Ref* sender);
void setAlignmentTop(ax::Ref* sender);
void setAlignmentMiddle(ax::Ref* sender);
void setAlignmentBottom(ax::Ref* sender);
void initWrapOption(const ax::Size& size);
void initToggleLabelTypeOption(const ax::Size& size);
void initAlignmentOption(const ax::Size& size);
void initFontSizeChange(const ax::Size& size);
void initSliders(const ax::Size& size);
void initTestLabel(const ax::Size& size);
void initDrawNode(const ax::Size& size);
ax::DrawNode* _drawNode;
ax::Label* _label;
2019-11-23 20:27:39 +08:00
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;
};
class LabelWrapNoBreakSpaceTest : public LabelLayoutBaseTest
{
public:
CREATE_FUNC(LabelWrapNoBreakSpaceTest);
LabelWrapNoBreakSpaceTest();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
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();
2022-10-18 19:17:36 +08:00
void onChangedRadioButtonSelect(ax::ui::RadioButton* radioButton, ax::ui::RadioButton::EventType type);
2019-11-23 20:27:39 +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();
2022-10-18 19:17:36 +08:00
void onChangedRadioButtonSelect(ax::ui::RadioButton* radioButton, ax::ui::RadioButton::EventType type);
2019-11-23 20:27:39 +08:00
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelCharMapFontTest : public LabelLayoutBaseTest
{
public:
CREATE_FUNC(LabelCharMapFontTest);
LabelCharMapFontTest();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue13846Test : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue13846Test);
2019-11-23 20:27:39 +08:00
LabelIssue13846Test();
2019-11-23 20:27:39 +08:00
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
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;
2022-10-18 19:17:36 +08:00
ax::Label* _label1a;
ax::Label* _label2a;
2019-11-23 20:27:39 +08:00
};
class LabelBold : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelBold);
LabelBold();
virtual std::string title() const override;
virtual std::string subtitle() const override;
2022-10-18 19:17:36 +08:00
ax::Label* _label1a;
ax::Label* _label2a;
2019-11-23 20:27:39 +08:00
};
class LabelUnderline : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelUnderline);
LabelUnderline();
virtual std::string title() const override;
virtual std::string subtitle() const override;
2022-10-18 19:17:36 +08:00
ax::Label* _label1a;
ax::Label* _label2a;
2019-11-23 20:27:39 +08:00
};
class LabelUnderlineMultiline : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelUnderlineMultiline);
LabelUnderlineMultiline();
virtual std::string title() const override;
virtual std::string subtitle() const override;
2022-10-18 19:17:36 +08:00
ax::Label* _label1a;
ax::Label* _label2a;
2019-11-23 20:27:39 +08:00
};
class LabelStrikethrough : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelStrikethrough);
LabelStrikethrough();
virtual std::string title() const override;
virtual std::string subtitle() const override;
2022-10-18 19:17:36 +08:00
ax::Label* _label1a;
ax::Label* _label2a;
2019-11-23 20:27:39 +08:00
};
class LabelLocalizationTest : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelLocalizationTest);
LabelLocalizationTest();
2022-10-18 19:17:36 +08:00
void onChangedRadioButtonSelect(ax::ui::RadioButton* radioButton, ax::ui::RadioButton::EventType type);
2019-11-23 20:27:39 +08:00
virtual std::string title() const override;
virtual std::string subtitle() const override;
2022-10-18 19:17:36 +08:00
ax::Label* _label1;
ax::Label* _label2;
2019-11-23 20:27:39 +08:00
cocostudio::ILocalizationManager* _localizationJson;
cocostudio::ILocalizationManager* _localizationBin;
};
class LabelIssue15214 : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue15214);
LabelIssue15214();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue16293 : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue16293);
LabelIssue16293();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue16471 : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue16471);
LabelIssue16471();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue16717 : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue16717);
LabelIssue16717();
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssueLineGap : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssueLineGap);
2019-11-23 20:27:39 +08:00
LabelIssueLineGap();
2019-11-23 20:27:39 +08:00
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class LabelIssue17902 : public AtlasDemoNew
{
public:
CREATE_FUNC(LabelIssue17902);
2019-11-23 20:27:39 +08:00
LabelIssue17902();
virtual void purgeCachedData();
2019-11-23 20:27:39 +08:00
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
2020-09-17 12:10:08 +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;
};
class LabelLetterColorsTest : public AtlasDemoNew
{
2019-11-23 20:27:39 +08:00
public:
CREATE_FUNC(LabelLetterColorsTest);
LabelLetterColorsTest();
virtual std::string title() const override;
virtual std::string subtitle() const override;
private:
2022-10-18 19:17:36 +08:00
static void setLetterColors(ax::Label* label, const ax::Color3B& color);
2019-11-23 20:27:39 +08:00
};
#endif