2013-09-16 20:54:13 +08:00
|
|
|
/****************************************************************************
|
|
|
|
Copyright (c) 2013 cocos2d-x.org
|
|
|
|
|
|
|
|
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.
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __TestCpp__UISceneManager__
|
|
|
|
#define __TestCpp__UISceneManager__
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
|
|
|
|
|
|
|
USING_NS_CC;
|
|
|
|
|
2013-12-23 15:35:35 +08:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
kUIButtonTest = 0,
|
|
|
|
kUIButtonTest_Scale9,
|
2015-01-20 20:57:54 +08:00
|
|
|
kUIButtonTest_Scale9_State_Change,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUIButtonTest_PressedAction,
|
|
|
|
kUIButtonTest_Title,
|
2014-07-23 18:52:03 +08:00
|
|
|
kUIButtonTest_RemoveSelf,
|
2014-07-31 11:07:20 +08:00
|
|
|
kUIButtonTestSwitchScale9,
|
2014-08-14 11:14:24 +08:00
|
|
|
kUIButtonTestZoomScale,
|
2014-09-12 13:50:13 +08:00
|
|
|
kUIButtonTextOnly,
|
2014-09-12 14:24:27 +08:00
|
|
|
kUIButtonIgnoreContentSizeTest,
|
2014-09-17 10:57:40 +08:00
|
|
|
kUIButtonTitleEffectTest,
|
2014-11-05 20:50:13 +08:00
|
|
|
kUIButtonFlipTest,
|
2014-12-23 15:03:31 +08:00
|
|
|
kUIButtonNormalDefaultTest,
|
|
|
|
kUIButtonDisableDefaultTest,
|
2014-10-23 22:23:13 +08:00
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
2014-08-19 10:28:24 +08:00
|
|
|
kUIEditBoxTest,
|
2014-09-19 14:21:18 +08:00
|
|
|
#endif
|
2013-12-23 15:35:35 +08:00
|
|
|
kUICheckBoxTest,
|
2014-12-23 15:03:31 +08:00
|
|
|
kUICheckBoxDefaultBehaviorTest,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUISliderTest,
|
|
|
|
kUISliderTest_Scale9,
|
2015-01-20 20:57:54 +08:00
|
|
|
kUISliderTest_Scale9_State_Change,
|
2014-12-23 15:03:31 +08:00
|
|
|
kUISliderNormalDefaultTest,
|
|
|
|
kUISliderDisabledDefaultTest,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUIImageViewTest,
|
|
|
|
kUIImageViewTest_Scale9,
|
2015-01-20 17:24:04 +08:00
|
|
|
kUIImageViewTest_Scale9_State_Change,
|
2014-07-24 11:52:42 +08:00
|
|
|
kUIImageViewTest_ContentSize,
|
2014-11-06 09:23:58 +08:00
|
|
|
kUIImageViewFlipTest,
|
|
|
|
|
2013-12-23 15:35:35 +08:00
|
|
|
kUILoadingBarTest_Left,
|
|
|
|
kUILoadingBarTest_Right,
|
2015-01-20 20:57:54 +08:00
|
|
|
kUILoadingBarTest_Scale9_State_Change,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUILoadingBarTest_Left_Scale9,
|
|
|
|
kUILoadingBarTest_Right_Scale9,
|
2014-03-04 16:51:35 +08:00
|
|
|
kUITextAtlasTest,
|
|
|
|
kUITextTest,
|
|
|
|
kUITextTest_LineWrap,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUILabelTest_Effect,
|
2014-03-04 16:51:35 +08:00
|
|
|
kUITextTest_TTF,
|
2014-11-26 15:05:20 +08:00
|
|
|
kUITextTest_IgnoreConentSize,
|
|
|
|
|
2014-03-04 16:51:35 +08:00
|
|
|
kUITextBMFontTest,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUITextFieldTest,
|
|
|
|
kUITextFieldTest_MaxLength,
|
|
|
|
kUITextFieldTest_Password,
|
2014-03-04 16:51:35 +08:00
|
|
|
kUITextFieldTest_LineWrap,
|
2014-07-14 14:29:28 +08:00
|
|
|
kUITextFieldTest_TrueTypeFont,
|
2014-08-13 11:28:37 +08:00
|
|
|
kUITextFieldTest_PlaceHolderColor,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUILayoutTest,
|
|
|
|
kUILayoutTest_Color,
|
|
|
|
kUILayoutTest_Gradient,
|
|
|
|
kUILayoutTest_BackGroundImage,
|
|
|
|
kUILayoutTest_BackGroundImage_Scale9,
|
|
|
|
kUILayoutTest_Layout_Linear_Vertical,
|
|
|
|
kUILayoutTest_Layout_Linear_Horizontal,
|
|
|
|
kUILayoutTest_Layout_Relative_Align_Parent,
|
|
|
|
kUILayoutTest_Layout_Relative_Location,
|
2014-12-22 14:51:50 +08:00
|
|
|
kUILayoutComponent_Berth_Test,
|
|
|
|
kUILayoutComponent_Berth_Stretch_Test,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUIScrollViewTest_Vertical,
|
|
|
|
kUIScrollViewTest_Horizontal,
|
|
|
|
kUIScrollViewTest_Both,
|
|
|
|
kUIScrollViewTest_ScrollToPercentBothDirection,
|
2014-08-15 16:21:27 +08:00
|
|
|
kUIScrollViewTest_ScrollToPercentBothDirection_Bounce,
|
|
|
|
kUIScrollViewNestTest,
|
2014-10-17 14:02:49 +08:00
|
|
|
kUIScrollViewRotated,
|
|
|
|
|
2013-12-23 15:35:35 +08:00
|
|
|
kUIPageViewTest,
|
2014-07-07 15:31:06 +08:00
|
|
|
kUIPageViewButtonTest,
|
2014-08-14 11:14:24 +08:00
|
|
|
kUIPageViewCustomScrollThreshold,
|
2014-08-15 15:28:28 +08:00
|
|
|
kUIPageViewTouchPropagationTest,
|
2014-10-10 16:29:33 +08:00
|
|
|
kUIPageViewDynamicAddAndRemoveTest,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUIListViewTest_Vertical,
|
|
|
|
kUIListViewTest_Horizontal,
|
|
|
|
kUIWidgetAddNodeTest,
|
2014-03-06 20:52:29 +08:00
|
|
|
kUIRichTextTest,
|
2014-05-05 11:25:30 +08:00
|
|
|
KUIFocusTest_HBox,
|
|
|
|
KUIFocusTest_VBox,
|
2014-05-06 14:38:45 +08:00
|
|
|
KUIFocusTest_NestedLayout1,
|
2014-05-07 11:40:01 +08:00
|
|
|
KUIFocusTest_NestedLayout2,
|
2014-05-07 18:27:05 +08:00
|
|
|
KUIFocusTest_NestedLayout3,
|
2014-05-20 17:56:52 +08:00
|
|
|
kUIFocusTest_ListView,
|
2014-05-08 18:14:32 +08:00
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
2014-05-09 11:30:07 +08:00
|
|
|
kUIVideoPlayerTest,
|
2014-09-17 22:30:15 +08:00
|
|
|
#endif
|
2014-10-16 16:46:49 +08:00
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
2014-08-26 11:39:56 +08:00
|
|
|
KWebViewTest,
|
2014-05-08 18:14:32 +08:00
|
|
|
#endif
|
2014-07-29 14:33:22 +08:00
|
|
|
kUIScale9SpriteTest,
|
|
|
|
kUIScale9SpriteHierarchialTest,
|
|
|
|
kUIScale9SpriteTouchTest,
|
|
|
|
kUIS9BatchNodeBasic,
|
|
|
|
kUIS9FrameNameSpriteSheet,
|
|
|
|
kUIS9FrameNameSpriteSheetRotated,
|
2014-09-28 05:56:00 +08:00
|
|
|
kUIS9FrameNameSpriteSheetCropped,
|
|
|
|
kUIS9FrameNameSpriteSheetCroppedRotated,
|
2014-07-29 14:33:22 +08:00
|
|
|
kUIS9BatchNodeScaledNoInsets,
|
|
|
|
kUIS9FrameNameSpriteSheetScaledNoInsets,
|
|
|
|
kUIS9FrameNameSpriteSheetRotatedScaledNoInsets,
|
|
|
|
kUIS9BatchNodeScaleWithCapInsets,
|
|
|
|
kUIS9FrameNameSpriteSheetInsets,
|
|
|
|
kUIS9FrameNameSpriteSheetInsetsScaled,
|
|
|
|
kUIS9FrameNameSpriteSheetRotatedInsets,
|
|
|
|
kUIS9_TexturePacker,
|
|
|
|
kUIS9FrameNameSpriteSheetRotatedInsetsScaled,
|
|
|
|
kUIS9FrameNameSpriteSheetRotatedSetCapInsetLater,
|
|
|
|
kUIS9CascadeOpacityAndColor,
|
|
|
|
kUIS9ZOrder,
|
|
|
|
kUIS9Flip,
|
2014-08-05 08:11:37 +08:00
|
|
|
kUIS9ChangeAnchorPoint,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUITestMax
|
|
|
|
};
|
|
|
|
|
2014-02-20 10:53:49 +08:00
|
|
|
class UISceneManager : public Ref
|
2013-09-16 20:54:13 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
UISceneManager();
|
|
|
|
~UISceneManager();
|
|
|
|
/** Returns the singleton of the ui scene manager. */
|
|
|
|
static UISceneManager * sharedUISceneManager();
|
|
|
|
static void purgeUISceneManager();
|
|
|
|
|
|
|
|
/** Returns the next ui scene. */
|
|
|
|
cocos2d::Scene *nextUIScene();
|
|
|
|
|
|
|
|
/** Returns the previous ui scene. */
|
|
|
|
cocos2d::Scene *previousUIScene();
|
|
|
|
|
|
|
|
/** Returns the current control scene. */
|
|
|
|
cocos2d::Scene *currentUIScene();
|
|
|
|
|
|
|
|
/** UI scene id. */
|
2013-12-23 15:35:35 +08:00
|
|
|
CC_SYNTHESIZE(int, _currentUISceneId, CurrentUISceneId)
|
|
|
|
|
|
|
|
CC_SYNTHESIZE(int, _minUISceneId, MinUISceneId)
|
|
|
|
CC_SYNTHESIZE(int, _maxUISceneId, MaxUISceneId)
|
2013-09-16 20:54:13 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* defined(__TestCpp__UISceneManager__) */
|