text: import phaser from 'phaser/src/phaser.js';
  import UIPlugin from '../../templates/ui/ui-plugin.js';
  
  const COLOR_PRIMARY = 0x4e342e;
  const COLOR_LIGHT = 0x7b5e57;
  const COLOR_DARK = 0x260e04;
  
  class Demo extends Phaser.Scene {
      constructor() {
          super({
              key: 'examples'
          })
      }
  
      preload() { 
          this.load.bitmapFont('gothic', 'assets/fonts/gothic.png', 'assets/fonts/gothic.xml');
      }
  
      create() {
          var textArea = this.rexUI.add.textArea({
              x: 400,
              y: 300,
              width: 220,
              height: 260,
  
              background: this.rexUI.add.roundRectangle(0, 0, 2, 2, 0, COLOR_PRIMARY),
  
              text: this.add.bitmapText(0, 0, 'gothic').setFontSize(16),
              // textMask: false,
  
              slider: {
                  track: this.rexUI.add.roundRectangle(0, 0, 20, 10, 10, COLOR_DARK),
                  thumb: this.rexUI.add.roundRectangle(0, 0, 0, 0, 13, COLOR_LIGHT),
              },
  
              header: this.rexUI.add.label({
                  height: 30,
  
                  orientation: 0,
                  background: this.rexUI.add.roundRectangle(0, 0, 20, 20, 0, COLOR_DARK),
                  text: this.add.bitmapText(0, 0, 'gothic', 'Header').setFontSize(16),
              }),
  
              footer: this.rexUI.add.label({
                  height: 30,
  
                  orientation: 0,
                  background: this.rexUI.add.roundRectangle(0, 0, 20, 20, 0, COLOR_DARK),
                  text: this.add.bitmapText(0, 0, 'gothic', 'Footer').setFontSize(16),
              }),
  
              content: CreateContent(10000),
          })
              .layout()
              .drawBounds(this.add.graphics(), 0xff0000);
  
          //textArea.setText(CreateContent(10000));
      }
  
      update() { }
  }
  
  var content = `Phaser is a fast, free, and fun open source HTML5 game framework that offers WebGL and Canvas rendering across desktop and mobile web browsers. Games can be compiled to iOS, Android and native apps by using 3rd party tools. You can use JavaScript or TypeScript for development.`;
  var CreateContent = function (linesCount) {
      var numbers = [];
      for (var i = 0; i < linesCount; i++) {
          numbers.push(i.toString());
      }
      return content + '\n' + numbers.join('\n');
  }
  
  var config = {
      type: Phaser.AUTO,
      parent: 'phaser-example',
      width: 800,
      height: 600,
      scale: {
          mode: Phaser.Scale.FIT,
          autoCenter: Phaser.Scale.CENTER_BOTH,
      },
      scene: Demo,
      plugins: {
          scene: [{
              key: 'rexUI',
              plugin: UIPlugin,
              mapping: 'rexUI'
          }]
      }
  };
  
  var game = new Phaser.Game(config);