[editor] tanks colors
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package ru.m.tankz.render;
|
||||
|
||||
import haxework.view.utils.BitmapUtil;
|
||||
import flash.display.Bitmap;
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.Shape;
|
||||
@@ -253,6 +254,14 @@ class EagleItem extends BitmapItem<Eagle> {
|
||||
var suffix = value.death ? '-death' : value.protect.active ? '-protected' : '';
|
||||
return 'resources/image/eagle/eagle${suffix}.png';
|
||||
}
|
||||
|
||||
override public function redraw():Void {
|
||||
var image = Assets.getBitmapData(getImage());
|
||||
if (!value.color.zero) {
|
||||
image = BitmapUtil.colorize(image, value.color);
|
||||
}
|
||||
view.bitmapData = image;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package ru.m.tankz.view;
|
||||
|
||||
import haxework.view.frame.FrameSwitcher;
|
||||
import haxework.view.ButtonView;
|
||||
import haxework.view.VGroupView;
|
||||
|
||||
@:template class SettingsFrame extends VGroupView {
|
||||
@@ -10,9 +9,7 @@ import haxework.view.VGroupView;
|
||||
|
||||
@:provide var frameSwitcher:FrameSwitcher;
|
||||
|
||||
@:view var close:ButtonView;
|
||||
|
||||
public function onPress(_):Void {
|
||||
public function close():Void {
|
||||
frameSwitcher.change(StartFrame.ID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,4 +19,4 @@ views:
|
||||
- id: close
|
||||
$type: haxework.view.ButtonView
|
||||
skinId: button.close
|
||||
+onPress: $this:onPress
|
||||
+onPress: $code:close()
|
||||
|
||||
Reference in New Issue
Block a user