2017-04-25 17:07:15 +00:00
|
|
|
|
2017-03-15 01:07:58 +00:00
|
|
|
var Text = require('./Text');
|
2017-04-25 17:07:15 +00:00
|
|
|
var BuildFromConfig = require('./BuildFromConfig');
|
2017-03-15 01:07:58 +00:00
|
|
|
var FactoryContainer = require('../../FactoryContainer');
|
|
|
|
|
|
|
|
var TextFactory = {
|
|
|
|
|
|
|
|
KEY: 'text',
|
|
|
|
|
|
|
|
add: function (x, y, text, style)
|
|
|
|
{
|
2017-04-04 22:58:33 +00:00
|
|
|
return this.children.add(new Text(this.state, x, y, text, style));
|
2017-03-15 01:07:58 +00:00
|
|
|
},
|
|
|
|
|
2017-04-25 17:07:15 +00:00
|
|
|
make: function (config)
|
2017-03-15 01:07:58 +00:00
|
|
|
{
|
2017-04-25 17:07:15 +00:00
|
|
|
return BuildFromConfig(this.state, config);
|
2017-03-15 01:07:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = FactoryContainer.register(TextFactory);
|