CCSlider Class Reference
Tasks
-
valueCurrent 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 *)thumbFileParameters
- 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.hinitWithBackgroundSprite:thumbMenuItem:
Designated init.
- (id)initWithBackgroundSprite:(CCSprite *)bgSprite thumbMenuItem:(CCMenuItem *)aThumbParameters
- 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