The current control state constant.
Class CCControl
#include <Geode/cocos/extensions/GUI/CCControlExtension/CCControl.h>
Examples0
Public static methods0
Public member functions22
cocos2d::extension::CCControlStategetState()const
ℹ Robtop Addition: Made non virtual
virtualboolisEnabled()
virtualboolisSelected()
virtualvoidsetHighlighted(boolbHighlighted)
A Boolean value that determines whether the control is highlighted.
virtualboolisHighlighted()
boolhasVisibleParents()
virtualvoidneedsLayout()
Updates the control layout using its current internal state.
virtualboolisOpacityModifyRGB()
virtualboolinit()
virtualvoidonEnter()
virtualvoidonExit()
virtualvoidregisterWithTouchDispatcher()
virtualvoidsendActionsForControlEvents(cocos2d::extension::CCControlEventcontrolEvents)
Sends action messages for the given control events.
controlEvents
virtualvoidaddTargetWithActionForControlEvents(cocos2d::CCObject*target,,cocos2d::extension::CCControlEventcontrolEvents)
Adds a target and action for a particular event (or events) to an internal dispatch table. The action message may optionnaly include the sender and the event as parameters, in that order. When you call this method, target is not retained.
target
action
controlEvents
virtualvoidremoveTargetWithActionForControlEvents(cocos2d::CCObject*target,,cocos2d::extension::CCControlEventcontrolEvents)
Removes a target and action for a particular event (or events) from an internal dispatch table.
target
action
controlEvents
virtualcocos2d::CCPointgetTouchLocation(cocos2d::CCTouch*touch)
Returns a point corresponding to the touh location converted into the control space coordinates.
touch
virtualboolisTouchInside(cocos2d::CCTouch*touch)
Returns a boolean value that indicates whether a touch is inside the bounds of the receiver. The given touch must be relative to the world.
touch
voidaddHandleOfControlEvent(intnFunID,cocos2d::extension::CCControlEventcontrolEvent)
voidremoveHandleOfControlEvent(cocos2d::extension::CCControlEventcontrolEvent)
Fields2
Protected member functions4
cocos2d::extension::CCInvocation*invocationWithTargetAndActionForControlEvent(cocos2d::CCObject*target,,cocos2d::extension::CCControlEventcontrolEvent)
Returns an CCInvocation object able to construct messages using a given target-action pair. (The invocation may optionnaly include the sender and the event as parameters, in that order)
target
action
controlEvent
cocos2d::CCArray*dispatchListforControlEvent(cocos2d::extension::CCControlEventcontrolEvent)
Returns the CCInvocation list for the given control event. If the list does not exist, it’ll create an empty array before returning it.
controlEvent
voidaddTargetWithActionForControlEvent(cocos2d::CCObject*target,,cocos2d::extension::CCControlEventcontrolEvent)
Adds a target and action for a particular event to an internal dispatch table. The action message may optionnaly include the sender and the event as parameters, in that order. When you call this method, target is not retained.
target
action
controlEvent
voidremoveTargetWithActionForControlEvent(cocos2d::CCObject*target,,cocos2d::extension::CCControlEventcontrolEvent)
Removes a target and action for a particular event from an internal dispatch table.
target
action
controlEvent
Protected fields5
;
The current control state constant.
ℹ Robtop Addition: Made non virtual
boolm_bEnabled;
boolm_bSelected;
boolm_bHighlighted;
cocos2d::CCDictionary*m_pDispatchTable;
Table of connection between the CCControlEvents and their associated target-actions pairs. For each CCButtonEvents a list of NSInvocation (which contains the target-action pair) is linked.