mirror of https://github.com/axmolengine/axmol.git
fixed documentation for better reading clarity
This commit is contained in:
parent
c89df2f243
commit
bd4615795e
|
@ -69,9 +69,9 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
/** Returns a new action that performs the exactly the reverse action.
|
||||
/** Returns a new action that performs the exact reverse of the action.
|
||||
*
|
||||
* @return A new action that performs the exactly the reverse action.
|
||||
* @return A new action that performs the exact reverse of the action.
|
||||
* @js NA
|
||||
*/
|
||||
virtual Action* reverse() const
|
||||
|
@ -239,7 +239,7 @@ class RepeatForever;
|
|||
|
||||
/** @class Speed
|
||||
* @brief Changes the speed of an action, making it take longer (speed>1)
|
||||
* or less (speed<1) time.
|
||||
* or shorter (speed<1) time.
|
||||
* Useful to simulate 'slow motion' or 'fast forward' effect.
|
||||
* @warning This action can't be Sequenceable because it is not an IntervalAction.
|
||||
*/
|
||||
|
|
|
@ -368,7 +368,7 @@ public:
|
|||
*/
|
||||
void enableStrikethrough();
|
||||
/**
|
||||
* Disable all effect to Label.
|
||||
* Disable all effect applied to Label.
|
||||
* @warning Please use disableEffect(LabelEffect::ALL) instead of this API.
|
||||
*/
|
||||
virtual void disableEffect();
|
||||
|
@ -505,7 +505,7 @@ public:
|
|||
* Makes the Label exactly this untransformed height.
|
||||
*
|
||||
* The Label's height be used for text align if the value not equal zero.
|
||||
* The text will display of incomplete when the size of Label not enough to support display all text.
|
||||
* The text will display incomplete if the size of Label is not large enough to display all text.
|
||||
*/
|
||||
void setHeight(float height){ setDimensions(_labelWidth, height); }
|
||||
float getHeight() const { return _labelHeight; }
|
||||
|
@ -518,12 +518,12 @@ public:
|
|||
virtual void updateContent();
|
||||
|
||||
/**
|
||||
* Provides a way to treats each character like a Sprite.
|
||||
* Provides a way to treat each character like a Sprite.
|
||||
* @warning No support system font.
|
||||
*/
|
||||
virtual Sprite * getLetter(int lettetIndex);
|
||||
|
||||
/** Makes the Label to clip upper and lower margin for reduce height of Label.*/
|
||||
/** Clips upper and lower margin to reduce height of Label.*/
|
||||
void setClipMarginEnabled(bool clipEnabled) { _clipEnabled = clipEnabled; }
|
||||
|
||||
bool isClipMarginEnabled() const { return _clipEnabled; }
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
|
||||
/**
|
||||
* Creates a Menu with it's item, then use addChild() to add
|
||||
* other items. It is used for script, it can't init with undetermined
|
||||
* other items. It is used for script, it can't be initialized with undetermined
|
||||
* number of variables.
|
||||
* @js NA
|
||||
*/
|
||||
|
@ -142,16 +142,17 @@ public:
|
|||
void alignItemsInRowsWithArray(const ValueVector& columns);
|
||||
|
||||
/**
|
||||
* Determines if the menu is enable.
|
||||
* Determines if the menu is enabled.
|
||||
* @see `setEnabled(bool)`.
|
||||
* @return whether the menu is enabled or not.
|
||||
*/
|
||||
virtual bool isEnabled() const { return _enabled; }
|
||||
|
||||
/**
|
||||
* Set whether the menu is visible.
|
||||
* Set whether the menu is visible. If set false, interacting with the menu
|
||||
* will have no effect.
|
||||
* The default value is true, a menu is default to visible.
|
||||
*@param value true if menu is enable, false if menu is disable.
|
||||
*@param value true if menu is to be enabled, false if menu is to be disabled.
|
||||
*/
|
||||
virtual void setEnabled(bool value) { _enabled = value; };
|
||||
|
||||
|
|
|
@ -155,10 +155,10 @@ public:
|
|||
/** Sets a new string to the inner label. */
|
||||
void setString(const std::string& label);
|
||||
|
||||
/** Gets the color that will be used to disable the item. */
|
||||
/** Gets the color that will be used when the item is disabled. */
|
||||
inline const Color3B& getDisabledColor() const { return _disabledColor; };
|
||||
|
||||
/** Sets the color that will be used to disable the item. */
|
||||
/** Sets the color that will be used when the item is disabled. */
|
||||
inline void setDisabledColor(const Color3B& color) { _disabledColor = color; };
|
||||
|
||||
/** Gets the label that is rendered. */
|
||||
|
@ -342,7 +342,7 @@ public:
|
|||
static MenuItemSprite * create(Node* normalSprite, Node* selectedSprite, Node* disabledSprite = nullptr);
|
||||
/** Creates a menu item with a normal and selected image with target/selector. */
|
||||
CC_DEPRECATED_ATTRIBUTE static MenuItemSprite * create(Node* normalSprite, Node* selectedSprite, Ref* target, SEL_MenuHandler selector);
|
||||
/** Creates a menu item with a normal,selected and disabled image with target/selector. */
|
||||
/** Creates a menu item with a normal, selected and disabled image with target/selector. */
|
||||
CC_DEPRECATED_ATTRIBUTE static MenuItemSprite * create(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, Ref* target, SEL_MenuHandler selector);
|
||||
/** Creates a menu item with a normal and selected image with a callable object. */
|
||||
static MenuItemSprite * create(Node* normalSprite, Node* selectedSprite, const ccMenuCallback& callback);
|
||||
|
@ -386,10 +386,10 @@ CC_CONSTRUCTOR_ACCESS:
|
|||
,_disabledImage(nullptr)
|
||||
{}
|
||||
|
||||
/** Initializes a menu item with a normal, selected and disabled image with target/selector. */
|
||||
/** Initializes a menu item with a normal, selected and disabled image with target/selector. */
|
||||
CC_DEPRECATED_ATTRIBUTE bool initWithNormalSprite(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, Ref* target, SEL_MenuHandler selector);
|
||||
|
||||
/** Initializes a menu item with a normal, selected and disabled image with a callable object. */
|
||||
/** Initializes a menu item with a normal, selected and disabled image with a callable object. */
|
||||
bool initWithNormalSprite(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, const ccMenuCallback& callback);
|
||||
|
||||
protected:
|
||||
|
@ -429,9 +429,9 @@ public:
|
|||
/** Creates a menu item with a normal and selected image with a callable object. */
|
||||
static MenuItemImage* create(const std::string&normalImage, const std::string&selectedImage, const ccMenuCallback& callback);
|
||||
|
||||
/** Creates a menu item with a normal,selected and disabled image with target/selector. */
|
||||
/** Creates a menu item with a normal,selected and disabled image with target/selector. */
|
||||
CC_DEPRECATED_ATTRIBUTE static MenuItemImage* create(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector);
|
||||
/** Creates a menu item with a normal,selected and disabled image with a callable object. */
|
||||
/** Creates a menu item with a normal,selected and disabled image with a callable object. */
|
||||
static MenuItemImage* create(const std::string&normalImage, const std::string&selectedImage, const std::string&disabledImage, const ccMenuCallback& callback);
|
||||
|
||||
/** Sets the sprite frame for the normal image. */
|
||||
|
@ -454,10 +454,10 @@ CC_CONSTRUCTOR_ACCESS:
|
|||
|
||||
bool init();
|
||||
|
||||
/** Initializes a menu item with a normal, selected and disabled image with target/selector. */
|
||||
/** Initializes a menu item with a normal, selected and disabled image with target/selector. */
|
||||
CC_DEPRECATED_ATTRIBUTE bool initWithNormalImage(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector);
|
||||
|
||||
/** Initializes a menu item with a normal, selected and disabled image with a callable object. */
|
||||
/** Initializes a menu item with a normal, selected and disabled image with a callable object. */
|
||||
bool initWithNormalImage(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, const ccMenuCallback& callback);
|
||||
|
||||
private:
|
||||
|
|
|
@ -484,7 +484,7 @@ CC_CONSTRUCTOR_ACCESS :
|
|||
Sprite();
|
||||
virtual ~Sprite();
|
||||
|
||||
/* Initializes an empty sprite with nothing init. */
|
||||
/* Initializes an empty sprite with no parameters. */
|
||||
virtual bool init() override;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue