39 lines
1.2 KiB
Haxe
39 lines
1.2 KiB
Haxe
package haxework.view.skin;
|
|
|
|
import flash.display.BitmapData;
|
|
import haxework.view.form.ButtonView;
|
|
import haxework.view.utils.DrawUtil;
|
|
|
|
class Skin {
|
|
|
|
public static var transparent(default, never):ISkin<SpriteView> = new SpriteSkin({color: 0, alpha: 0});
|
|
|
|
public static function bitmap(image:BitmapData, fillType:FillType = null):ISkin<SpriteView> {
|
|
return new BitmapSkin(image, fillType);
|
|
}
|
|
|
|
public static function color(color:Int, alpha:Float = 1.0):ISkin<SpriteView> {
|
|
return new SpriteSkin({color: color, alpha: alpha});
|
|
}
|
|
|
|
public static function buttonColor(color:Int, borderColor:Int = -1):ISkin<ButtonView> {
|
|
return new ButtonColorSkin(color, borderColor);
|
|
}
|
|
|
|
public static function buttonBitmap(image:BitmapData, fillType:FillType = null):ISkin<ButtonView> {
|
|
return new ButtonBitmapSkin(image, fillType);
|
|
}
|
|
|
|
public static function tabColor(color:Int):ISkin<ButtonView> {
|
|
return new TabColorSkin(color);
|
|
}
|
|
|
|
public static function scrollHorizontal(foreColor:Int, backColor:Int) {
|
|
return new HScrollBarSkin(foreColor, backColor);
|
|
}
|
|
|
|
public static function scrollVertical(foreColor:Int, backColor:Int) {
|
|
return new VScrollBarSkin(foreColor, backColor);
|
|
}
|
|
}
|