1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
define.class('$ui/view', function(require, $ui$, view, icon, label){
this.attributes = {
title: Config({type:String, value:"Untitled"}),
fontsize: Config({type:float, value:12, meta:"fontsize"})
}
this.padding = 0;
this.margin = 140;
this.borderradius = vec4(10,10,1,1);
this.bgcolor = vec4("#4e4e4e");
this.flex = 1;
this.maxwidth = 500;
this.flexdirection ="column"
this.dropshadowopacity = 0.4;
this.padding=4;
this.dropshadowhardness=0,
this.dropshadowradius=20
this.dropshadowoffset=vec2(9,9);
this.render = function(){
return [
view({margin:vec4(1,1,2,0),bgcolor:"#4e4e4e", borderwidth:0,borderradius:vec4(10,10,1,.1),padding:vec4(10,2,10,2)},
label({font: require('$resources/fonts/opensans_bold_ascii.glf'),margin:5, text:this.title, bgcolor:NaN, fontsize:this.fontsize, fgcolor: "white" })
),
view({padding:2, bgcolor:"#707070"})
,this.constructor_children
];
}
})
|