2
* This file is part of the dis-Emi-A HaXe Library. Copyright © edA-qa mort-ora-y
3
* For full copyright and license information please refer to doc/license.txt.
11
* The Theme class coordinates all aspects of drawing standard elements.
12
* For now it is mainly focused on implements rather than actual object
17
static public var current(getCurrent,null) : Theme;
19
static public function getCurrent()
26
static public function standard()
29
th.dialogColor = Color.rgb(0.75,0.75,0.85);
30
th.buttonColor = Color.rgb(0.65,0.65,0.75);
31
th.menuColor = Color.rgb( 0.9, 0.9, 0.95 );
32
th.borderColor = Color.rgb( 0, 0, 0.1 );
33
th.textColor = Color.rgb( 0, 0, 0 );
35
th.highTextColor = Color.rgb(1,1,1);
36
th.highBackColor = Color.rgb(0.25, 0.5, 0.8 );
38
th.selLineColor = Color.rgb(0,0,0);
39
th.selFillColor = Color.rgb(1,1,1);
41
th.borderXWidth = 0.1;
44
Color.rgb( 1, 0.5, 0.5 ),
45
Color.rgb( 0.5, 1, 0.5 ),
46
Color.rgb( 0.5, 0.5, 1 ),
47
Color.rgb( 1, 1, 0.5 ),
48
Color.rgb( 0.5, 1, 1 ),
49
Color.rgb( 1, 0.5, 1 ),
51
Color.rgb( 0.5, 0.5, 0.5 )
54
th.textFont = FontManager.getDefault();
58
/*protected*/ function new()
62
public var dialogColor : Color;
63
public var buttonColor : Color;
64
public var menuColor : Color;
65
public var borderColor : Color;
66
public var textColor : Color;
68
public var highTextColor : Color;
69
public var highBackColor : Color;
71
public var selLineColor : Color;
72
public var selFillColor : Color;
74
public var borderXWidth : Float;
76
public var chartPalette : Array<Color>;
78
public var textFont : FontManager;
80
public function getBorderWidth()
82
return Math.ceil( FontManager.getDefault().byXWidth( borderXWidth ) );
86
public function getChartColor( ndx : Int ) : Color
88
return chartPalette[ ndx % chartPalette.length ];