2014-06-08 22:37:14 +00:00
|
|
|
gui.widgets.Label = {
|
|
|
|
new: func(parent, style, cfg)
|
|
|
|
{
|
|
|
|
var cfg = Config.new(cfg);
|
|
|
|
var m = gui.Widget.new(gui.widgets.Label);
|
|
|
|
m._focus_policy = m.NoFocus;
|
|
|
|
m._setView( style.createWidget(parent, "label", cfg) );
|
|
|
|
|
|
|
|
return m;
|
|
|
|
},
|
|
|
|
setText: func(text)
|
|
|
|
{
|
|
|
|
me._view.setText(me, text);
|
|
|
|
return me;
|
|
|
|
},
|
2014-06-10 16:46:52 +00:00
|
|
|
setImage: func(img)
|
|
|
|
{
|
|
|
|
me._view.setImage(me, img);
|
|
|
|
return me;
|
|
|
|
},
|
2014-06-08 22:37:14 +00:00
|
|
|
setBackground: func(bg)
|
|
|
|
{
|
|
|
|
me._view.setBackground(me, bg);
|
|
|
|
return me;
|
|
|
|
}
|
|
|
|
};
|