Skip to content

Instantly share code, notes, and snippets.

@RealyUniqueName
Created February 15, 2016 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RealyUniqueName/9f297cc2c51d64b424e9 to your computer and use it in GitHub Desktop.
Save RealyUniqueName/9f297cc2c51d64b424e9 to your computer and use it in GitHub Desktop.
Minimal slider example for StablexUI
package;
import flash.Lib;
import ru.stablex.ui.skins.Paint;
import ru.stablex.ui.UIBuilder;
import ru.stablex.ui.widgets.Slider;
/**
* Simple demo project for StablexUI
*/
class Main {
/**
* Enrty point
*
*/
static public function main () : Void
{
//initialize StablexUI
UIBuilder.init();
var bgSkin = new Paint();
bgSkin.color = 0x005d00;
bgSkin.border = 8;
bgSkin.borderColor = 0x003A00;
var sliderSkin = new Paint();
sliderSkin.color = 0xFF0000;
var slider = UIBuilder.create(Slider, {
id : 'mySlider',
left : 50,
top : 120,
w : 200,
h : 30,
skin : bgSkin,
slider : {w : 30, heightPt : 100, skin:sliderSkin}
});
Lib.current.addChild(slider);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment