[view] add Theme

This commit is contained in:
2019-07-09 17:44:48 +03:00
parent 61e74a3755
commit 215d820e68
11 changed files with 185 additions and 59 deletions

View File

@@ -3,16 +3,17 @@ package haxework.view;
import flash.display.DisplayObject;
import flash.display.InteractiveObject;
import flash.geom.Rectangle;
import haxework.resources.IResources;
import haxework.view.core.Geometry;
import haxework.view.skin.ISkin;
import haxework.view.theme.ITheme;
class View<C:DisplayObject> implements IView<C> {
@:provide private var r:IResources;
private static var counter:Int = 0;
public static var updater(default, null):ViewUpdater = new ViewUpdater();
@:provide var theme:ITheme;
public var id(default, default):String;
public var x(default, set):Float;
@@ -134,7 +135,7 @@ class View<C:DisplayObject> implements IView<C> {
}
private function set_skinId(value:String):String {
r.skin.bind(value, this, "skin");
skin = theme != null ? theme.resolve(value) : [];
return value;
}