SXSlider

type:
extension
author:
Malcolm
description:
A simple slider control similar to UISlider
lastupdate:
2011-04-11
compatible:
v1.1
tag:
slider, uislider, form
homepage:
https://gist.github.com/914991
download:
https://gist.github.com/gists/914991/download

Usage

- (id)initWithWidth:(float)width height:(float)height {
    self = [super initWithWidth:width height:height];
	slider = [[SXSlider alloc] init];
	slider.min = -20;
	slider.max = 100;
	[self addChild:slider];
	[slider addEventListener:@selector(onValueChange:) atObject:self forType:SX_SLIDER_EVENT_UPDATED];
    return self;
}
 
- (void)onValueChange:(SPEvent*)event{
	NSLog(@"slider val: %f", slider.value);
}

Changelog

  • 2011/04/12 07:29: First public version

Source Code

Discussion

No comments so far. Feel free to edit this part of the page.

  extensions/sx_slider.txt · Last modified: 2015/09/14 11:14 by 127.0.0.1
 
Powered by DokuWiki