mirror of https://github.com/axmolengine/axmol.git
update UI module code comments
This commit is contained in:
parent
0dc89db97b
commit
dae29e5678
|
@ -80,7 +80,7 @@ public:
|
|||
*
|
||||
* @param disabled disabled state texture name.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTextures(const std::string& normal,
|
||||
const std::string& selected,
|
||||
|
@ -92,7 +92,7 @@ public:
|
|||
*
|
||||
* @param normal normal state texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTextureNormal(const std::string& normal, TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
@ -101,7 +101,7 @@ public:
|
|||
*
|
||||
* @param selected selected state texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTexturePressed(const std::string& selected, TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
@ -110,7 +110,7 @@ public:
|
|||
*
|
||||
* @param disabled dark state texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTextureDisabled(const std::string& disabled, TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
*
|
||||
* @param frontCrossDisabled cross dark state texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
static CheckBox* create(const std::string& backGround,
|
||||
const std::string& backGroundSeleted,
|
||||
|
@ -106,7 +106,7 @@ public:
|
|||
*
|
||||
* @param frontCrossDisabled cross dark state texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTextures(const std::string& backGround,
|
||||
const std::string& backGroundSelected,
|
||||
|
@ -120,7 +120,7 @@ public:
|
|||
*
|
||||
* @param backGround backGround texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTextureBackGround(const std::string& backGround,TextureResType type = TextureResType::LOCAL);
|
||||
|
||||
|
@ -129,7 +129,7 @@ public:
|
|||
*
|
||||
* @param backGroundSelected backGround selected state texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTextureBackGroundSelected(const std::string& backGroundSelected,TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
@ -138,7 +138,7 @@ public:
|
|||
*
|
||||
* @param cross cross texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTextureFrontCross(const std::string&,TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
@ -147,7 +147,7 @@ public:
|
|||
*
|
||||
* @param backGroundDisabled backGroundDisabled texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTextureBackGroundDisabled(const std::string& backGroundDisabled,TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
@ -156,7 +156,7 @@ public:
|
|||
*
|
||||
* @param frontCrossDisabled frontCrossDisabled texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTextureFrontCrossDisabled(const std::string& frontCrossDisabled,TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
*
|
||||
* @param imageFileName file name of texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
static ImageView* create(const std::string& imageFileName, TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
@ -71,7 +71,7 @@ public:
|
|||
*
|
||||
* @param fileName file name of texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTexture(const std::string& fileName,TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ public:
|
|||
*
|
||||
* @param fileName image file path.
|
||||
*
|
||||
* @param texType @see TextureResType. UI_TEX_TYPE_LOCAL means local file, UI_TEX_TYPE_PLIST means sprite frame.
|
||||
* @param texType @see TextureResType. TextureResType::LOCAL means local file, TextureResType::PLIST means sprite frame.
|
||||
*/
|
||||
void setBackGroundImage(const std::string& fileName,TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
@ -143,7 +143,7 @@ public:
|
|||
bool isBackGroundImageScale9Enabled()const;
|
||||
|
||||
/**
|
||||
* Sets background color for layout, if color type is LAYOUT_COLOR_SOLID
|
||||
* Sets background color for layout, if color type is BackGroundColorType::SOLIDE
|
||||
*
|
||||
* @param color
|
||||
*/
|
||||
|
@ -152,7 +152,7 @@ public:
|
|||
const Color3B& getBackGroundColor()const;
|
||||
|
||||
/**
|
||||
* Sets background color for layout, if color type is LAYOUT_COLOR_GRADIENT
|
||||
* Sets background color for layout, if color type is BackGroundColorType::GRADIENT
|
||||
*
|
||||
* @param start color
|
||||
*
|
||||
|
@ -174,7 +174,7 @@ public:
|
|||
GLubyte getBackGroundColorOpacity()const;
|
||||
|
||||
/**
|
||||
* Sets background color vector for layout, if color type is LAYOUT_COLOR_GRADIENT
|
||||
* Sets background color vector for layout, if color type is BackGroundColorType::GRADIENT
|
||||
*
|
||||
* @param vector
|
||||
*/
|
||||
|
|
|
@ -180,9 +180,9 @@ public:
|
|||
/**
|
||||
* Changes scroll direction of scrollview.
|
||||
*
|
||||
* @see SCROLLVIEW_DIR SCROLLVIEW_DIR_VERTICAL means vertical scroll, SCROLLVIEW_DIR_HORIZONTAL means horizontal scroll
|
||||
* @see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
|
||||
*
|
||||
* @param SCROLLVIEW_DIR
|
||||
* @param dir, set the list view's scroll direction
|
||||
*/
|
||||
virtual void setDirection(Direction dir) override;
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
*
|
||||
* @param texture file name of texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadTexture(const std::string& texture,TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
|
|
@ -127,8 +127,7 @@ public:
|
|||
*/
|
||||
ssize_t getCurPageIndex() const;
|
||||
|
||||
//TODO: add Vector<Layout*> member variables into UIPageView, but it only used for reference purpose,
|
||||
//all the pages are added into proteced node, so does scrollview, listview
|
||||
|
||||
Vector<Layout*>& getPages();
|
||||
|
||||
Layout* getPage(ssize_t index);
|
||||
|
|
|
@ -95,18 +95,18 @@ public:
|
|||
/**
|
||||
* Changes scroll direction of scrollview.
|
||||
*
|
||||
* @see SCROLLVIEW_DIR SCROLLVIEW_DIR_VERTICAL means vertical scroll, SCROLLVIEW_DIR_HORIZONTAL means horizontal scroll
|
||||
* @see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
|
||||
*
|
||||
* @param SCROLLVIEW_DIR
|
||||
* @param dir
|
||||
*/
|
||||
virtual void setDirection(Direction dir);
|
||||
|
||||
/**
|
||||
* Gets scroll direction of scrollview.
|
||||
*
|
||||
* @see SCROLLVIEW_DIR SCROLLVIEW_DIR_VERTICAL means vertical scroll, SCROLLVIEW_DIR_HORIZONTAL means horizontal scroll
|
||||
* @see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
|
||||
*
|
||||
* @return SCROLLVIEW_DIR
|
||||
* @return Direction
|
||||
*/
|
||||
Direction getDirection()const;
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
*
|
||||
* @param fileName file name of texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadBarTexture(const std::string& fileName,TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
@ -123,7 +123,7 @@ public:
|
|||
*
|
||||
* @param slider ball disabled dark state texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadSlidBallTextures(const std::string& normal,
|
||||
const std::string& pressed,
|
||||
|
@ -135,7 +135,7 @@ public:
|
|||
*
|
||||
* @param normal normal state texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadSlidBallTextureNormal(const std::string& normal,TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
@ -144,7 +144,7 @@ public:
|
|||
*
|
||||
* @param selected selected state texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadSlidBallTexturePressed(const std::string& pressed,TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
@ -153,7 +153,7 @@ public:
|
|||
*
|
||||
* @param disabled dark state texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadSlidBallTextureDisabled(const std::string& disabled,TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
@ -162,7 +162,7 @@ public:
|
|||
*
|
||||
* @param fileName file path of texture.
|
||||
*
|
||||
* @param texType @see UI_TEX_TYPE_LOCAL
|
||||
* @param texType @see TextureResType
|
||||
*/
|
||||
void loadProgressBarTexture(const std::string& fileName, TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
|
|
|
@ -236,7 +236,6 @@ public:
|
|||
CC_DEPRECATED_ATTRIBUTE void addTouchEventListener(Ref* target,SEL_TouchEvent selector);
|
||||
void addTouchEventListener(ccWidgetTouchCallback callback);
|
||||
|
||||
//cocos2d property
|
||||
|
||||
/**
|
||||
* Changes the position (x,y) of the widget in OpenGL coordinates
|
||||
|
@ -249,10 +248,7 @@ public:
|
|||
virtual void setPosition(const Vec2 &pos) override;
|
||||
|
||||
/**
|
||||
* Changes the position (x,y) of the widget in OpenGL coordinates
|
||||
*
|
||||
* Usually we use p(x,y) to compose Vec2 object.
|
||||
* The original point (0,0) is at the left-bottom corner of screen.
|
||||
* Set the percent(x,y) of the widget in OpenGL coordinates
|
||||
*
|
||||
* @param percent The percent (x,y) of the widget in OpenGL coordinates
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue