I'm trying Feathers UI SWC from Josh and haven't found SolidColor
as a class...
I thought Haxe represented enumeration members as subclasses, but it looks like it translates an enumeration into a single class using (tag, index, parameters). Does this mean I'll have to construct it manually?
I have tried:
package feathers.graphics {
public function SolidColor(color: int, alpha: Number): FillStyle {
return new FillStyle("SolidColor", 0, [color, alpha]);
}
}
Got blank screen with:
package fortoresseXY.app {
import flash.display.*;
import flash.events.*;
import feathers.controls.*;
import feathers.graphics.*;
import feathers.skins.*;
import agera.core.AgeraApplication;
public class FortoresseXYApplication extends Application {
public function FortoresseXYApplication() {
super();
new AgeraApplication();
this.addEventListener(Event.ADDED_TO_STAGE, this.FortoresseXYApplication_initialize);
}
private function FortoresseXYApplication_initialize(event: Event): void {
this.stage.scaleMode = StageScaleMode.SHOW_ALL;
// Test
var panel1: Panel = new Panel();
panel1.explicitWidth = stage.width;
panel1.explicitHeight = stage.height;
var skin1: RectangleSkin = new RectangleSkin();
skin1.fill = SolidColor(0x444444, 1);
panel1.backgroundSkin = skin1;
this.addChild(panel1);
}
}
}
Second try:
package feathers.graphics {
public function SolidColor(arg1: int, arg2: Number = NaN): FillStyle {
return new FillStyle("SolidColor", 0, [isNaN(arg2) ? 1 : arg2, arg1]);
}
}