[skin] fix ButtonColorSkin
This commit is contained in:
@@ -19,8 +19,8 @@ class ButtonColorSkin implements ISkin<ButtonView> {
|
|||||||
private function set_color(value:Int):Int {
|
private function set_color(value:Int):Int {
|
||||||
colors = new Map<ButtonState, Int>();
|
colors = new Map<ButtonState, Int>();
|
||||||
colors.set(ButtonState.UP, value);
|
colors.set(ButtonState.UP, value);
|
||||||
colors.set(ButtonState.DOWN, ColorUtil.diff(value, -32));
|
colors.set(ButtonState.DOWN, ColorUtil.diff(value, -24));
|
||||||
colors.set(ButtonState.OVER, ColorUtil.diff(value, 32));
|
colors.set(ButtonState.OVER, ColorUtil.diff(value, 24));
|
||||||
//disable = ColorUtil.multiply(value, 0.6);
|
//disable = ColorUtil.multiply(value, 0.6);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@@ -36,6 +36,8 @@ class ButtonColorSkin implements ISkin<ButtonView> {
|
|||||||
graphics.beginFill(color, alpha);
|
graphics.beginFill(color, alpha);
|
||||||
graphics.lineStyle(2, ColorUtil.multiply(color, 1.5));
|
graphics.lineStyle(2, ColorUtil.multiply(color, 1.5));
|
||||||
graphics.drawRoundRect(1, 1, view.width - 2, view.height - 2, 5, 5);
|
graphics.drawRoundRect(1, 1, view.width - 2, view.height - 2, 5, 5);
|
||||||
|
graphics.lineStyle();
|
||||||
|
graphics.endFill();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function selectColor(view:ButtonView):Int {
|
private function selectColor(view:ButtonView):Int {
|
||||||
|
|||||||
Reference in New Issue
Block a user