Class CCControlSwitch

#include <Geode/cocos/extensions/GUI/CCControlExtension/CCControlSwitch.h>
classCCControlSwitch:publiccocos2d::extension::CCControl{ ... }
No description provided
Examples0
Public static methods2
staticcocos2d::extension::CCControlSwitch*create(,,,)

Creates a switch with a mask sprite, on/off sprites for on/off states and a thumb sprite.

staticcocos2d::extension::CCControlSwitch*create(,,,,,)

Creates a switch with a mask sprite, on/off sprites for on/off states, a thumb sprite and an on/off labels.

Public member functions12
boolinitWithMaskSprite(,,,)

Initializes a switch with a mask sprite, on/off sprites for on/off states and a thumb sprite.

boolinitWithMaskSprite(,,,,,)

Initializes a switch with a mask sprite, on/off sprites for on/off states, a thumb sprite and an on/off labels.

voidsetOn(
boolisOn
,
boolanimated
)

Set the state of the switch to On or Off, optionally animating the transition.

Parameters

isOn

YES if the switch should be turned to the On position; NO if it should be turned to the Off position. If the switch is already in the designated position, nothing happens.

animated

YES to animate the "flipping" of the switch; otherwise NO.
voidsetOn(
boolisOn
)
No description provided
boolisOn()
No description provided
boolhasMoved()
No description provided
virtualvoidsetEnabled(
boolenabled
)
No description provided
cocos2d::CCPointlocationFromTouch()
No description provided
virtualboolccTouchBegan(,)
No description provided
virtualvoidccTouchMoved(,)
No description provided
virtualvoidccTouchEnded(,)
No description provided
virtualvoidccTouchCancelled(,)
No description provided
Fields4
;

Sprite which represents the view.

floatm_fInitialTouchXPosition
;
No description provided
boolm_bMoved
;
No description provided
boolm_bOn
;

A Boolean value that determines the off/on state of the switch.

Protected member functions0
Protected fields0
Derived classes0