CCControlButton
CCControlButton
Cocos2DInheritance: System.Object → Cocos2D.CCNode → Cocos2D.CCLayer → Cocos2D.CCLayerRGBA → Cocos2D.CCControl
Implements: Cocos2D.ICCSelectorProtocol, Cocos2D.ICCFocusable, Cocos2D.ICCTargetedTouchDelegate, Cocos2D.ICCStandardTouchDelegate, Cocos2D.ICCTouchDelegate, Cocos2D.ICCKeypadDelegate, Cocos2D.ICCKeyboardDelegate, System.Collections.Generic.IComparer{Cocos2D.CCNode}, Cocos2D.ICCAccelerometerDelegate, Cocos2D.ICCRGBAProtocol
Constructors
CCControlButton()
CCControlButton()()CCControlButton(CCNode)
CCControlButton(CCNode)(Cocos2D.CCNode sprite)Parameters:
sprite (Cocos2D.CCNode)CCControlButton(CCNode, CCNode)
CCControlButton(CCNode, CCNode)(Cocos2D.CCNode label, Cocos2D.CCNode backgroundSprite)Parameters:
label (Cocos2D.CCNode)backgroundSprite (Cocos2D.CCNode)CCControlButton(string, string, float)
CCControlButton(string, string, float)(System.String title, System.String fontName, System.Single fontSize)Parameters:
title (System.String)fontName (System.String)fontSize (System.Single)Fields
CCControlButtonMarginLR(System.Int32)
CCControlButtonMarginTB(System.Int32)
_backgroundSprite(Cocos2D.CCNode)
_backgroundSpriteDispatchTable(System.Collections.Generic.DictionaryCocos2D.CCControlState,Cocos2D.CCNode)
_currentTitle(System.String)
_currentTitleColor(Cocos2D.CCColor3B)
_doesAdjustBackgroundImage(System.Boolean)
_isPushed(System.Boolean)
_labelAnchorPoint(Cocos2D.CCPoint)
_marginH(System.Int32)
_marginV(System.Int32)
_parentInited(System.Boolean)
_preferredSize(Cocos2D.CCSize)
_titleColorDispatchTable(System.Collections.Generic.DictionaryCocos2D.CCControlState,Cocos2D.CCColor3B)
_titleDispatchTable(System.Collections.Generic.DictionaryCocos2D.CCControlState,System.String)
_titleLabel(Cocos2D.CCNode)
_titleLabelDispatchTable(System.Collections.Generic.DictionaryCocos2D.CCControlState,Cocos2D.CCNode)
_zoomOnTouchDown(System.Boolean)
kZoomActionTag(System.Int32)
Properties
BackgroundSprite(Cocos2D.CCNode)
Color(Cocos2D.CCColor3B)
Enabled(System.Boolean)
Highlighted(System.Boolean)
IsPushed(System.Boolean)
LabelAnchorPoint(Cocos2D.CCPoint)
Opacity(System.Byte)
PreferredSize(Cocos2D.CCSize)
Selected(System.Boolean)
TitleLabel(Cocos2D.CCNode)
ZoomOnTouchDown(System.Boolean)
Methods
DoesAdjustBackgroundImage()
System.Boolean DoesAdjustBackgroundImage()()Returns:
System.BooleanGetBackgroundSpriteForState(CCControlState)
Cocos2D.CCNode GetBackgroundSpriteForState(CCControlState)(Cocos2D.CCControlState state)Parameters:
state (Cocos2D.CCControlState)Returns:
Cocos2D.CCNodeGetTitleBmFontForState(CCControlState)
System.String GetTitleBmFontForState(CCControlState)(Cocos2D.CCControlState state)Parameters:
state (Cocos2D.CCControlState)Returns:
System.StringGetTitleColorForState(CCControlState)
Cocos2D.CCColor3B GetTitleColorForState(CCControlState)(Cocos2D.CCControlState state)Parameters:
state (Cocos2D.CCControlState)Returns:
Cocos2D.CCColor3BGetTitleForState(CCControlState)
System.String GetTitleForState(CCControlState)(Cocos2D.CCControlState state)Parameters:
state (Cocos2D.CCControlState)Returns:
System.StringGetTitleLabelForState(CCControlState)
Cocos2D.CCNode GetTitleLabelForState(CCControlState)(Cocos2D.CCControlState state)Parameters:
state (Cocos2D.CCControlState)Returns:
Cocos2D.CCNodeGetTitleTtfForState(CCControlState)
System.String GetTitleTtfForState(CCControlState)(Cocos2D.CCControlState state)Parameters:
state (Cocos2D.CCControlState)Returns:
System.StringGetTitleTtfSizeForState(CCControlState)
System.Single GetTitleTtfSizeForState(CCControlState)(Cocos2D.CCControlState state)Parameters:
state (Cocos2D.CCControlState)Returns:
System.SingleInit()
System.Boolean Init()()Returns:
System.BooleanExample
InitWithBackgroundSprite(CCNode)
System.Boolean InitWithBackgroundSprite(CCNode)(Cocos2D.CCNode sprite)Parameters:
sprite (Cocos2D.CCNode)Returns:
System.BooleanInitWithLabelAndBackgroundSprite(CCNode, CCNode)
System.Boolean InitWithLabelAndBackgroundSprite(CCNode, CCNode)(Cocos2D.CCNode node, Cocos2D.CCNode backgroundSprite)Parameters:
node (Cocos2D.CCNode)backgroundSprite (Cocos2D.CCNode)Returns:
System.BooleanInitWithTitleAndFontNameAndFontSize(string, string, float)
System.Boolean InitWithTitleAndFontNameAndFontSize(string, string, float)(System.String title, System.String fontName, System.Single fontSize)Parameters:
title (System.String)fontName (System.String)fontSize (System.Single)Returns:
System.BooleanNeedsLayout()
NeedsLayout()()Example
SetAdjustBackgroundImage(bool)
SetAdjustBackgroundImage(bool)(System.Boolean adjustBackgroundImage)Parameters:
adjustBackgroundImage (System.Boolean)SetBackgroundSpriteForState(CCNode, CCControlState)
SetBackgroundSpriteForState(CCNode, CCControlState)(Cocos2D.CCNode sprite, Cocos2D.CCControlState state)Parameters:
sprite (Cocos2D.CCNode)state (Cocos2D.CCControlState)SetBackgroundSpriteFrameForState(CCSpriteFrame, CCControlState)
SetBackgroundSpriteFrameForState(CCSpriteFrame, CCControlState)(Cocos2D.CCSpriteFrame spriteFrame, Cocos2D.CCControlState state)Parameters:
spriteFrame (Cocos2D.CCSpriteFrame)state (Cocos2D.CCControlState)SetMargins(int, int)
SetMargins(int, int)(System.Int32 marginH, System.Int32 marginV)Parameters:
marginH (System.Int32)marginV (System.Int32)SetTitleBmFontForState(string, CCControlState)
SetTitleBmFontForState(string, CCControlState)(System.String fntFile, Cocos2D.CCControlState state)Parameters:
fntFile (System.String)state (Cocos2D.CCControlState)SetTitleColorForState(CCColor3B, CCControlState)
SetTitleColorForState(CCColor3B, CCControlState)(Cocos2D.CCColor3B color, Cocos2D.CCControlState state)Parameters:
color (Cocos2D.CCColor3B)state (Cocos2D.CCControlState)SetTitleForState(string, CCControlState)
SetTitleForState(string, CCControlState)(System.String title, Cocos2D.CCControlState state)Parameters:
title (System.String)state (Cocos2D.CCControlState)SetTitleLabelForState(CCNode, CCControlState)
SetTitleLabelForState(CCNode, CCControlState)(Cocos2D.CCNode titleLabel, Cocos2D.CCControlState state)Parameters:
titleLabel (Cocos2D.CCNode)state (Cocos2D.CCControlState)SetTitleTtfForState(string, CCControlState)
SetTitleTtfForState(string, CCControlState)(System.String fntFile, Cocos2D.CCControlState state)Parameters:
fntFile (System.String)state (Cocos2D.CCControlState)SetTitleTtfSizeForState(float, CCControlState)
SetTitleTtfSizeForState(float, CCControlState)(System.Single size, Cocos2D.CCControlState state)Parameters:
size (System.Single)state (Cocos2D.CCControlState)TouchBegan(CCTouch)
System.Boolean TouchBegan(CCTouch)(Cocos2D.CCTouch pTouch)Parameters:
pTouch (Cocos2D.CCTouch)Returns:
System.BooleanExample
TouchCancelled(CCTouch)
TouchCancelled(CCTouch)(Cocos2D.CCTouch pTouch)Parameters:
pTouch (Cocos2D.CCTouch)Example
TouchEnded(CCTouch)
TouchEnded(CCTouch)(Cocos2D.CCTouch pTouch)Parameters:
pTouch (Cocos2D.CCTouch)Example
TouchMoved(CCTouch)
TouchMoved(CCTouch)(Cocos2D.CCTouch pTouch)Parameters:
pTouch (Cocos2D.CCTouch)Example
Events
OnButtonTap(Event)