This commit is contained in:
2014-03-31 09:58:24 +04:00
parent fd404111ce
commit 22fdf93d2b
3 changed files with 5 additions and 1 deletions

View File

@@ -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;

View File

@@ -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>;
}

View File

@@ -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>();
}
}