Пример #1
0
  function _createCloseBtn() {
    var content = tplBtn({
      label: 'Browse Stages',
      classes: 'btn-browse'
    });

    this._closeButton = new Surface({
      content: content,
      classes: [
        'stage-levels',
        'stage-' + this.options.stage
      ]
    });

    var mod = new StateModifier({
      size: [undefined, 50],
      origin: [0.5, 1],
      align: [0.5, 1],
      transform: Transform.translate(0, 50, 1)
    });

    this._closeButton._mod = mod;

    this.node.add(mod).add(this._closeButton);
  }
Пример #2
0
  function _createLFBPlayButton() {

    var content = tplBtn({
      label: 'Play',
      classes: 'btn-play'
    });

    this.playButton = new Surface({
      content: content
    });

    this.playButton.setClasses([
      'stage-level-back',
      'stage-'+this.options.stage,
      'stage-level--color'+this.options.color
    ]);

    this.playButtonMod = new StateModifier({
      size: [this.options.width-50, 50],
      origin: [0.5, 1],
      align: [0.5, 1],
      transform: Transform.translate(0, -50, 1)
    });

    this.node.add(this.playButtonMod).add(this.playButton);
  }