[add] (render) add RenderManager

This commit is contained in:
2020-03-03 22:18:17 +03:00
parent d622247868
commit 7ed368b984
16 changed files with 128 additions and 36 deletions

View File

@@ -3,6 +3,7 @@ package ru.m.skin;
import format.SVG;
import haxework.color.Color;
import haxework.view.form.ButtonView;
import haxework.view.form.ToggleButtonView;
import haxework.view.skin.ISkin;
using StringTools;
@@ -47,6 +48,12 @@ using haxework.color.ColorUtil;
update();
var svg = svgs.get(view.state);
var graphics = view.content.graphics;
var color = this.color;
if (Std.is(view, ToggleButtonView)) {
if (!cast(view, ToggleButtonView).on) {
color = color.multiply(0.5);
}
}
graphics.beginFill(0, 0);
graphics.drawRect(0, 0, view.width, view.height);
graphics.beginFill(color);