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,
|
|
|
|
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,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUICheckBoxTest,
|
|
|
|
kUISliderTest,
|
|
|
|
kUISliderTest_Scale9,
|
|
|
|
kUIImageViewTest,
|
|
|
|
kUIImageViewTest_Scale9,
|
2014-07-24 11:52:42 +08:00
|
|
|
kUIImageViewTest_ContentSize,
|
2013-12-23 15:35:35 +08:00
|
|
|
kUILoadingBarTest_Left,
|
|
|
|
kUILoadingBarTest_Right,
|
|
|
|
kUILoadingBarTest_Left_Scale9,
|
|
|
|
kUILoadingBarTest_Right_Scale9,
|
2014-03-04 16:51:35 +08:00
|
|
|
kUITextAtlasTest,
|
|
|
|
kUITextTest,
|
|
|
|
kUITextTest_LineWrap,
|
2014-06-09 14:34:46 +08:00
|
|
|
|
2013-12-23 15:35:35 +08:00
|
|
|
kUILabelTest_Effect,
|
2014-03-04 16:51:35 +08:00
|
|
|
kUITextTest_TTF,
|
|
|
|
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,
|
|
|
|
kUIScrollViewTest_Vertical,
|
|
|
|
kUIScrollViewTest_Horizontal,
|
|
|
|
kUIScrollViewTest_Both,
|
|
|
|
kUIScrollViewTest_ScrollToPercentBothDirection,
|
|
|
|
kUIScrollViewTest_ScrollToPercentBothDirection_Bounce,
|
|
|
|
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,
|
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-05-08 18:14:32 +08:00
|
|
|
#endif
|
2014-07-29 14:33:22 +08:00
|
|
|
kUIScale9SpriteTest,
|
|
|
|
kUIScale9SpriteHierarchialTest,
|
|
|
|
kUIScale9SpriteTouchTest,
|
|
|
|
kUIS9BatchNodeBasic,
|
|
|
|
kUIS9FrameNameSpriteSheet,
|
|
|
|
kUIS9FrameNameSpriteSheetRotated,
|
|
|
|
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__) */
|