-
BObject
-
Node
-
MenuItem
-
MenuItemSprite
- MenuItemImage
-
MenuItemSprite
-
MenuItem
-
Node
Class: MenuItemImage
- Module
- cocos.nodes
- Defined In
- libs/cocos2d/nodes/MenuItem.js
- Extends
- MenuItemSprite
Public Properties
| Property | Defined By | |
|---|---|---|
| Expand anchorPoint |
anchorPoint : geometry.Point
Anchor point for scaling and rotation. 0x0 is top left and 1x1 is bottom right
|
Node |
| Expand anchorPointInPixels |
anchorPointInPixels : geometry.Point
Anchor point for scaling and rotation in pixels from top left
|
Node |
| Expand boundingBox | boundingBox : geometry.Rect <read-only> | Node |
| Expand children |
children : cocos.nodes.Node[]
The child Nodes
|
Node |
| Expand contentSize |
contentSize : geometry.Size
Size of the node
|
Node |
| Expand id |
id : Integer
<read-only>
Unique ID for this object
|
BObject |
| Expand parent |
parent : cocos.nodes.Node
Parent node
|
Node |
| Expand position |
position : geometry.Point
Position relative to parent node
|
Node |
| Expand rect | rect : geometry.Rect <read-only> | MenuItem |
| Expand rotation |
rotation : Float
Rotation angle in degrees
|
Node |
| Expand scale | scale : Float | Node |
| Expand scaleX |
scaleX : Float
X scale factor
|
Node |
| Expand scaleY |
scaleY : Float
Y scale factor
|
Node |
| Expand tag |
tag : *
Unique tag to identify the node
|
Node |
| Expand visible |
visible : boolean
Is the node visible
|
Node |
| Expand visibleRect |
visibleRect : geometry.Rect
<read-only>
The area of the node currently visible on screen. Returns an rect even
if visible is false.
|
Node |
| Expand worldBoundingBox | worldBoundingBox : geometry.Rect <read-only> | Node |
| Expand zOrder |
zOrder : Integer
Nodes Z index. i.e. draw order
|
Node |
Public Methods
| Method | Defined By | |
|---|---|---|
| Expand MenuItemImage |
new
MenuItemImage ()
:
cocos.nodes.MenuItemImage
<constructor>
MenuItem that accepts image files
Named ArgumentsReturns
|
MenuItemImage |
| Expand activate |
activate ()
:
void
Returns
|
MenuItem |
| Expand addChild |
addChild ()
:
cocos.nodes.Node
Add a child Node
Named Arguments
Returns
|
Node |
| Expand bindTo |
bindTo (key:String,target:BOject,[targetKey:String],[noNotify:Boolean])
:
void
Bind the value of a property on this object to that of another object so
they always have the same value. Setting the value on either object will update
the other too.
Arguments
Returns
|
BObject |
| Expand changed |
changed (key:*)
:
void
Arguments
Returns
|
BObject |
| Expand cleanup |
cleanup ()
:
void
Returns
|
Node |
| Expand convertToNodeSpace |
convertToNodeSpace (worldPoint:*)
:
void
Arguments
Returns
|
Node |
| Expand detatchChild |
detatchChild (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand draw |
draw (ctx:*)
:
void
Arguments
Returns
|
MenuItemSprite |
| Expand get |
get (key:String)
:
*
Get a property from the object. Always use this instead of trying to
access the property directly. This will ensure all bindings, setters and
getters work correctly.
Arguments
Returns
|
BObject |
| Expand getChild |
getChild (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand nodeToParentTransform |
nodeToParentTransform ()
:
void
Returns
|
Node |
| Expand nodeToWorldTransform |
nodeToWorldTransform ()
:
void
Returns
|
Node |
| Expand parentToNodeTransform |
parentToNodeTransform ()
:
void
Returns
|
Node |
| Expand pauseSchedulerAndActions |
pauseSchedulerAndActions ()
:
void
Returns
|
Node |
| Expand removeChild |
removeChild (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand reorderChild |
reorderChild (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand resumeSchedulerAndActions |
resumeSchedulerAndActions ()
:
void
Returns
|
Node |
| Expand runAction |
runAction (action:*)
:
void
Arguments
Returns
|
Node |
| Expand scheduleUpdate |
scheduleUpdate (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand set |
set (key:String,value:*)
:
void
Set a property on the object. Always use this instead of trying to
access the property directly. This will ensure all bindings, setters and
getters work correctly.
Arguments
Returns
|
BObject |
| Expand setValues |
setValues (kvp:Object)
:
void
Set multiple propertys in one go
Arguments
Returns
|
BObject |
| Expand stopAllActions |
stopAllActions ()
:
void
Returns
|
Node |
| Expand transform |
transform (context:*)
:
void
Arguments
Returns
|
Node |
| Expand unbind |
unbind (key:String)
:
void
Remove binding from a property which set setup using BObject#bindTo.
Arguments
Returns
|
BObject |
| Expand unbindAll |
unbindAll ()
:
void
Remove all bindings on this object
Returns
|
BObject |
| Expand unscheduleAllSelectors |
unscheduleAllSelectors ()
:
void
Returns
|
Node |
| Expand visit |
visit (context:*,rect:*)
:
void
Arguments
Returns
|
Node |
| Expand worldToNodeTransform |
worldToNodeTransform ()
:
void
Returns
|
Node |
Public Events
| Event | Defined By | |
|---|---|---|
| Expand onEnter |
onEnter ()
:
void
Triggered when the node is added to a scene
Returns
|
Node |
| Expand onExit |
onExit ()
:
void
Triggered when the node is removed from a scene
Returns
|
Node |
Private Members
This class has no private members.