fix
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package haxework.gui;
|
||||
|
||||
import haxework.gui.utils.DrawUtil.FillType;
|
||||
import haxework.gui.skin.BitmapSkin;
|
||||
import haxework.gui.skin.ButtonBitmapSkin;
|
||||
import flash.display.BitmapData;
|
||||
@@ -15,7 +16,7 @@ class ImageView extends SpriteView {
|
||||
private function set_image(value:BitmapData):BitmapData {
|
||||
if (image != value) {
|
||||
image = value;
|
||||
skin = untyped new BitmapSkin(image);
|
||||
skin = untyped new BitmapSkin(image, FillType.CONTAIN);
|
||||
invalidate();
|
||||
}
|
||||
return image;
|
||||
|
||||
@@ -9,4 +9,5 @@ interface IResources {
|
||||
public var color(default, null):ResMap<Int>;
|
||||
public var movie(default, null):ResMap<MovieClip>;
|
||||
public var text(default, null):ResMap<String>;
|
||||
public var float(default, null):ResMap<Float>;
|
||||
}
|
||||
@@ -50,11 +50,13 @@ class Resources implements IResources {
|
||||
public var color(default, null):ResMap<Int>;
|
||||
public var movie(default, null):ResMap<MovieClip>;
|
||||
public var text(default, null):ResMap<String>;
|
||||
public var float(default, null):ResMap<Float>;
|
||||
|
||||
public function new() {
|
||||
image = new ResMap<BitmapData>();
|
||||
color = new ResMap<Int>();
|
||||
movie = new ResMap<MovieClip>();
|
||||
text = new ResMap<String>();
|
||||
float = new ResMap<Float>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user