Flash Online Conference #10 - October 16, 2014 A look at the most important new features in Feathers 2.0, including a deep dive into the new skinning and theme architecture. Feathers is the open source user interface component library for Starling Framework. Starling and Feathers run on Adobe AIR for mobile and desktop and Adobe Flash Player in the browser.
3. Button.globalStyleProvider = new FunctionStyleProvider(
skinButton );
4. Theme Passes global style provider to component class.
Component Defaults to global style provider in constructor.
Component Initializes when added to stage. Component Calls
applyStyles() on style provider. Style Provider Sets properties on
component.
5. var button1:Button = new Button(); button1.label = "Cancel";
// no style name this.addChild( button1 ); var button2:Button = new
Button(); button2.label = "Delete"; // the style provider will see
the style name and call // a different function
button2.styleNameList.add( "warning-button" ); button2.y = 100;
this.addChild( button2 );
6. Call component constructor. Add "warning-button" string to
styleNameList property. Component initializes and applyStyles() is
called on style provider. StyleNameFunction style provider checks
styleNameList for values. If styleNameList contains
"warning-button", call skinWarningButton() If no style names match
a function, fall back to calling skinNormalButton()
7. button.styleProvider = null; // no theme!
8. button.styleProvider = new AddOnFunctionStyleProvider(
button.styleProvider, setExtraStyles );