2019-11-23 20:27:39 +08:00
|
|
|
/****************************************************************************
|
|
|
|
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
|
|
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2022-07-10 09:47:41 +08:00
|
|
|
https://axis-project.github.io/
|
2021-12-31 12:12:40 +08:00
|
|
|
|
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:
|
2021-12-31 12:12:40 +08:00
|
|
|
|
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.
|
2021-12-31 12:12:40 +08:00
|
|
|
|
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 __cocos2d_tests__UIScale9SpriteTest__
|
|
|
|
#define __cocos2d_tests__UIScale9SpriteTest__
|
|
|
|
#include "UIScene.h"
|
|
|
|
|
|
|
|
DEFINE_TEST_SUITE(UIScale9SpriteTests);
|
|
|
|
|
|
|
|
class UIScale9SpriteTest : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIScale9SpriteTest);
|
|
|
|
|
|
|
|
UIScale9SpriteTest();
|
|
|
|
~UIScale9SpriteTest();
|
|
|
|
|
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class UIScale9SpriteHierarchialTest : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIScale9SpriteHierarchialTest);
|
|
|
|
|
|
|
|
UIScale9SpriteHierarchialTest();
|
|
|
|
~UIScale9SpriteHierarchialTest();
|
|
|
|
|
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class UIScale9SpriteTouchTest : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIScale9SpriteTouchTest);
|
|
|
|
|
|
|
|
UIScale9SpriteTouchTest();
|
|
|
|
~UIScale9SpriteTouchTest();
|
|
|
|
|
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9BatchNodeBasic
|
|
|
|
|
|
|
|
class UIS9BatchNodeBasic : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9BatchNodeBasic);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheet
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheet : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheet);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetRotated
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetRotated : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetRotated);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetCroppedSimple
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetCroppedSimple : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetCroppedSimple);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetCroppedRotatedSimple
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetCroppedRotatedSimple : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetCroppedRotatedSimple);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetCropped
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetCropped : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetCropped);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetCroppedRotated
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetCroppedRotated : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetCroppedRotated);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9BatchNodeScaledNoInsets
|
|
|
|
|
|
|
|
class UIS9BatchNodeScaledNoInsets : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9BatchNodeScaledNoInsets);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetScaledNoInsets
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetScaledNoInsets : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetScaledNoInsets);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetRotatedScaledNoInsets
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetRotatedScaledNoInsets : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetRotatedScaledNoInsets);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9BatchNodeScaleWithCapInsets
|
|
|
|
|
|
|
|
class UIS9BatchNodeScaleWithCapInsets : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9BatchNodeScaleWithCapInsets);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetInsets
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetInsets : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetInsets);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetInsetsScaled
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetInsetsScaled : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetInsetsScaled);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetRotatedInsets
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetRotatedInsets : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetRotatedInsets);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9_TexturePacker
|
|
|
|
|
|
|
|
class UIS9_TexturePacker : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9_TexturePacker);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetRotatedInsetsScaled
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetRotatedInsetsScaled : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetRotatedInsetsScaled);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9FrameNameSpriteSheetRotatedInsetsScaled
|
|
|
|
|
|
|
|
class UIS9FrameNameSpriteSheetRotatedSetCapInsetLater : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9FrameNameSpriteSheetRotatedSetCapInsetLater);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// S9CascadeOpacityAndColor
|
|
|
|
|
|
|
|
class UIS9CascadeOpacityAndColor : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9CascadeOpacityAndColor);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Scale9Sprite ZOrder
|
|
|
|
|
|
|
|
class UIS9ZOrder : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9ZOrder);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Scale9Sprite Flip
|
|
|
|
|
|
|
|
class UIS9Flip : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9Flip);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class UIS9ChangeAnchorPoint : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9ChangeAnchorPoint);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class UIS9NinePatchTest : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9NinePatchTest);
|
|
|
|
|
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
2021-12-31 12:12:40 +08:00
|
|
|
class UIS9BatchTest : public UIScene
|
2019-11-23 20:27:39 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9BatchTest);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
2021-12-31 12:12:40 +08:00
|
|
|
class UIS9ToggleRenderingTypeTest : public UIScene
|
2019-11-23 20:27:39 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9ToggleRenderingTypeTest);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
2021-12-31 12:12:40 +08:00
|
|
|
class UIS9GlobalZOrderTest : public UIScene
|
2019-11-23 20:27:39 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9GlobalZOrderTest);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
2021-12-31 12:12:40 +08:00
|
|
|
class UIS9EnableScale9FalseTest : public UIScene
|
2019-11-23 20:27:39 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9EnableScale9FalseTest);
|
2021-12-31 12:12:40 +08:00
|
|
|
|
2019-11-23 20:27:39 +08:00
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
2021-12-31 12:12:40 +08:00
|
|
|
class UIS9GrayStateOpacityTest : public UIScene
|
2019-11-23 20:27:39 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CREATE_FUNC(UIS9GrayStateOpacityTest);
|
2022-07-11 17:50:21 +08:00
|
|
|
void sliderEvent(axis::Ref* sender, axis::ui::Slider::EventType type);
|
2019-11-23 20:27:39 +08:00
|
|
|
|
|
|
|
virtual bool init() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* defined(__cocos2d_tests__UIScale9SpriteTest__) */
|