mirror of
https://github.com/photonstorm/phaser
synced 2024-12-28 05:53:49 +00:00
19 lines
655 B
JavaScript
19 lines
655 B
JavaScript
var BitmapText = require('./DynamicBitmapText');
|
|
var GetAdvancedValue = require('../../../utils/object/GetAdvancedValue');
|
|
var BuildGameObject = require('../../BuildGameObject');
|
|
|
|
var DynamicBitmapTextCreator = function (state, config)
|
|
{
|
|
var font = GetAdvancedValue(config, 'font', '');
|
|
var text = GetAdvancedValue(config, 'text', '');
|
|
var size = GetAdvancedValue(config, 'size', false);
|
|
var align = GetAdvancedValue(config, 'align', 'left');
|
|
|
|
var bitmapText = new BitmapText(state, 0, 0, font, text, size, align);
|
|
|
|
BuildGameObject(state, bitmapText, config);
|
|
|
|
return bitmapText;
|
|
};
|
|
|
|
module.exports = DynamicBitmapTextCreator;
|