CCSlider Class Reference
Tasks
-
value
Current chosen value, min is 0.0f, max is 1.0f.
property -
+ sliderWithBackgroundFile:thumbFile:
Creates slider with backround image filename & thumb image filename.
-
+ sliderWithBackgroundSprite:thumbMenuItem:
Creates slider with given bg sprite and menu item as a thumb.
-
– initWithBackgroundFile:thumbFile:
Easy init – filenames instead of CCSprite & CCMenuItem. Uses designated init inside.
-
– initWithBackgroundSprite:thumbMenuItem:
Designated init.
Class Methods
Instance Methods
initWithBackgroundFile:thumbFile:
Easy init – filenames instead of CCSprite & CCMenuItem. Uses designated init inside.
- (id)initWithBackgroundFile:(NSString *)bgFile thumbFile:(NSString *)thumbFile
Parameters
- bgFile
Filename for background CCSprite.
- thumbFile
Filename, that is used to create normal & selected images for thumbMenuItem. Selected sprite is darker than normal sprite.
Declared In
CCSlider.h
initWithBackgroundSprite:thumbMenuItem:
Designated init.
- (id)initWithBackgroundSprite:(CCSprite *)bgSprite thumbMenuItem:(CCMenuItem *)aThumb
Parameters
- bgSprite
CCSprite, that is used as a background. It’s bounding box is used to determine max & min x position for a thumb menu item.
- aThumb
MenuItem that is used as a thumb. Used without CCMenu, so CCMenuItem#activate doesn’t get called.
Declared In
CCSlider.h