[client] update StartFrame
This commit is contained in:
25
src/client/haxe/ru/m/skin/SimpleButtonSkin.hx
Normal file
25
src/client/haxe/ru/m/skin/SimpleButtonSkin.hx
Normal file
@@ -0,0 +1,25 @@
|
||||
package ru.m.skin;
|
||||
|
||||
import flash.display.Graphics;
|
||||
import haxework.gui.ButtonView;
|
||||
import haxework.gui.skin.ButtonColorSkin;
|
||||
|
||||
class SimpleButtonSkin extends ButtonColorSkin {
|
||||
|
||||
public var borderColor(default, default):Int;
|
||||
|
||||
public function new(color:Int = 0xffffff, borderColor:Int = 0x95937D) {
|
||||
super(color, 0.6);
|
||||
this.borderColor = borderColor;
|
||||
}
|
||||
|
||||
override public function draw(view:ButtonView):Void {
|
||||
var color:Int = selectColor(view);
|
||||
var graphics:Graphics = view.contentAsSprite.graphics;
|
||||
graphics.clear();
|
||||
graphics.beginFill(color, alpha);
|
||||
graphics.lineStyle(2, borderColor);
|
||||
graphics.drawRoundRect(0, 0, view.width, view.height, 10, 10);
|
||||
graphics.endFill();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user