cocos2d-iphone-extensions  0.2
Cocos2D Extensions API Reference (iOS version) for www.kobold2d.com developers
 All Classes Files Functions Properties
CCSlider Class Reference

List of all members.

Public Member Functions

(id) - initWithBackgroundFile:thumbFile:
(id) - initWithBackgroundSprite:thumbMenuItem:

Static Public Member Functions

(id) + sliderWithBackgroundFile:thumbFile:
(id) + sliderWithBackgroundSprite:thumbMenuItem:

Protected Attributes

float minX
float maxX
CCMenuItem * _thumb
CCSprite * _bg

Properties

float value

Detailed Description

for Cocos2D. Designed with SFX/Music level options in mind.


Member Function Documentation

- (id) initWithBackgroundFile: (NSString *)  bgFile
thumbFile: (NSString *)  thumbFile 

Easy init - filenames instead of CCSprite & CCMenuItem. Uses designated init inside.

Parameters:
thumbFileFilename, that is used to create normal & selected images for thumbMenuItem. Selected sprite is darker than normal sprite.
bgFileFilename for background CCSprite.
- (id) initWithBackgroundSprite: (CCSprite *)  bgSprite
thumbMenuItem: (CCMenuItem *)  aThumb 

Designated init.

Parameters:
bgSpriteCCSprite, that is used as a background. It's bounding box is used to determine max & min x position for a thumb menu item.
aThumbMenuItem that is used as a thumb. Used without CCMenu, so CCMenuItem::activate doesn't get called.
+ (id) sliderWithBackgroundFile: (NSString *)  bgFile
thumbFile: (NSString *)  thumbFile 

Creates slider with backround image filename & thumb image filename.

See also:
- initWithBackgroundFile:thumbFile:
+ (id) sliderWithBackgroundSprite: (CCSprite *)  bgSprite
thumbMenuItem: (CCMenuItem *)  aThumb 

Creates slider with given bg sprite and menu item as a thumb.

See also:
initWithBackgroundSprite: thumbMenuItem:

Property Documentation

- (float) value [read, write, assign]

Current chosen value, min is 0.0f, max is 1.0f.


The documentation for this class was generated from the following file: