text: import {game} from '../index';
  
  export const configText = { fontFamily: "Nunito Sans",
  fontStyle: "italic",
  fontWeight: 600,
  fontSize: 30,
  lineHeight: 33,
  align: "center",
  letterSpacing: -0.05,
  color: "#303052"};
  
  export const configTextOverlay = { fontFamily: 'Nunito Sans',
  fontStyle: "normal",
  fontWeight: 700,
  fontSize: 24,
  lineHeight: 33,
  align: "center",
  letterSpacing: -0.05,
  color: "#FFFFFF"};
  
  // add background
  export function background(image) {
      if (game.config.inputGamepadEventTarget.innerHeight / game.config.inputGamepadEventTarget.innerWidth > image.height / image.width) {
          image.displayHeight = game.config.inputGamepadEventTarget.innerHeight;
          image.scaleX = image.scaleY;            
      } else {
          image.displayWidth = game.config.inputGamepadEventTarget.innerWidth;
          image.scaleY = image.scaleX;
      };
  
      image.y = game.config.inputGamepadEventTarget.innerHeight/2;
      image.x = game.config.inputGamepadEventTarget.innerWidth/2;           
  };
  
  export function blackout(shadow) {
      shadow.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 2;
      shadow.displayWidth = game.config.inputGamepadEventTarget.innerWidth * 2; 
  };
  
  export function disappearance(indexScene, image, delay) {
      setTimeout(() => {
          game.scene.scenes[indexScene].tweens.add({
              targets: image,
              alpha: 0,
              duration: 200
          });
      }, delay);
  };
  
  // add body
  export function placingDown(image) {
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.95;
      image.scaleX = image.scaleY;        
      image.setPosition(game.config.inputGamepadEventTarget.innerWidth / 2, game.config.inputKeyboardEventTarget.innerHeight - image.displayHeight / 2);            
  };
  
  export function placingDownMore(image) {
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 1.07;
      image.scaleX = image.scaleY;        
      image.setPosition(game.config.inputGamepadEventTarget.innerWidth / 2, game.config.inputKeyboardEventTarget.innerHeight - image.displayHeight / 3.132);            
  };
  
  export function moveDown(indexScene, image) {
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.95;
      image.displayWidth = game.config.inputGamepadEventTarget.innerHeight * 0.63828125;
      image.y = game.config.inputKeyboardEventTarget.innerHeight - image.displayHeight / 2
  
      game.scene.scenes[indexScene].tweens.add({
          targets: image,
          displayHeight: game.config.inputGamepadEventTarget.innerHeight * 1.07,
          displayWidth: game.config.inputGamepadEventTarget.innerHeight * 0.714875,
          y: game.config.inputKeyboardEventTarget.innerHeight - image.displayHeight / 2.7,
          duration: 100
      });
  };
  
  // add icons
  export function placingDownRightIcon(image) {
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.27;
      image.scaleX = image.scaleY;        
      image.setPosition(game.config.inputGamepadEventTarget.innerWidth / 2 + image.displayWidth / 1.8, game.config.inputKeyboardEventTarget.innerHeight - image.displayHeight / 1.5);            
  };
  
  export function placingDownLeftIcon(image) {
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.27;
      image.scaleX = image.scaleY;        
      image.setPosition(game.config.inputGamepadEventTarget.innerWidth / 2 - image.displayWidth / 1.8, game.config.inputKeyboardEventTarget.innerHeight - image.displayHeight / 1.5);            
  };
  
  export function appearanceIcon(indexScene, image, delay) {
      image.displayWidth = 0;
      image.displayHeight = 0;
  
      setTimeout(() => {
          game.scene.scenes[indexScene].tweens.add({
              targets: image,
              displayHeight: game.config.inputGamepadEventTarget.innerHeight * 0.27,
              displayWidth: game.config.inputGamepadEventTarget.innerHeight * 0.236842105,
              duration: 100
          });
      }, delay);
  };
  
  export function touchIcon(indexScene, image, icon2) {
      game.scene.scenes[indexScene].tweens.add({
              targets: image,
              displayHeight: game.config.inputGamepadEventTarget.innerHeight * 0.25,
              displayWidth: game.config.inputGamepadEventTarget.innerHeight * 0.219298245,
              duration: 150
          });
  
          setTimeout(() => {
          game.scene.scenes[indexScene].tweens.add({
              targets: image,
              displayHeight: game.config.inputGamepadEventTarget.innerHeight * 0.27,
              displayWidth: game.config.inputGamepadEventTarget.innerHeight * 0.236842105,
              duration: 150
          });
      }, 150)
  
      setTimeout(() => {
          game.scene.scenes[indexScene].tweens.add({
              targets: image,
              displayHeight: 0,
              displayWidth: 0,
              duration: 100
          });
  
          game.scene.scenes[indexScene].tweens.add({
              targets: icon2,
              displayHeight: 0,
              displayWidth: 0,
              duration: 100
          });
      }, 400)
  }
  
  // add icon light
  export function appearanceIconLight(indexScene, image) {
      image.displayWidth = game.config.inputGamepadEventTarget.innerHeight * 0.236842105;
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.27;
  
      game.scene.scenes[indexScene].tweens.add({
          targets: image,
          displayHeight: game.config.inputGamepadEventTarget.innerHeight * 0.3564,
          displayWidth: game.config.inputGamepadEventTarget.innerHeight * 0.312631579,
          duration: 100
      });
  };
  
  export function disappearanceIconLight(indexScene, image) {
      image.displayWidth = game.config.inputGamepadEventTarget.innerHeight * 0.312631579;
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.3564;
  
      game.scene.scenes[indexScene].tweens.add({
          targets: image,
          displayHeight: game.config.inputGamepadEventTarget.innerHeight * 0.27,
          displayWidth: game.config.inputGamepadEventTarget.innerHeight * 0.236842105,
          duration: 10
      });
  };
  
  // add hand pointer
  export function placingHandPointer(image) {
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.27;
      image.scaleX = image.scaleY;        
      image.setPosition(game.config.inputGamepadEventTarget.innerWidth / 2 - image.displayWidth / 3, game.config.inputKeyboardEventTarget.innerHeight - image.displayHeight / 3.5);            
  };
  
  export function moveUpHandPointer(indexScene, image) {
      image.y = game.config.inputGamepadEventTarget.innerHeight + image.displayHeight / 3.5;
  
      setTimeout(() => {
          game.scene.scenes[indexScene].tweens.add({        
              targets: image,
              y: game.config.inputGamepadEventTarget.innerHeight - image.displayHeight / 3.5,
              duration: 150,
              onComplete: movingHandPointer(indexScene, image),
              onCompleteParams: [ indexScene, image ]
          });
      }, 2000);
  };
  
  export function moveDownHandPointer(indexScene, image) {
      image.y = game.config.inputGamepadEventTarget.innerHeight - image.displayHeight / 3.5;
  
      game.scene.scenes[indexScene].tweens.add({
          targets: image,
          y: game.config.inputGamepadEventTarget.innerHeight + image.displayHeight / 2.5,
          duration: 150
      });
  };
  
  export function movingHandPointer(indexScene, image) {
      setTimeout(() => {
          game.scene.scenes[indexScene].tweens.add({
              targets: image,
              x: game.config.inputGamepadEventTarget.innerWidth / 2 + image.displayWidth * 0.9,
              ease: 'Linear',
              yoyo: true,
              duration: 300,
              repeat: -1,
          });
      }, 300);
  };
  
  // add rectangle progress
  export function placingRectangleProgress(image) {
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.01;
      image.scaleX = image.scaleY;        
      image.setPosition(game.config.inputGamepadEventTarget.innerWidth / 2, image.displayHeight * 4.7);            
  };
  
  export function appearance(indexScene, image) {
      image.alpha = 0;
      game.scene.scenes[indexScene].tweens.add({
          targets: image,
          alpha: 1,
          duration: 200
      });
  };
  
  // add rectangle overlay
  export function placingRectangleOverlay(image) {
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.047;
      image.scaleX = image.scaleY;        
      image.setPosition(game.config.inputGamepadEventTarget.innerWidth / 2, image.displayHeight);            
  };
  
  export function moveDownRectangleOverlay(indexScene, image) {
      image.y = -image.displayHeight;
  
      setTimeout(() => {
          game.scene.scenes[indexScene].tweens.add({
              targets: image,
              y: image.displayHeight,
              duration: 100
          });
      }, 2000);
  };
  
  export function moveUpRectangleOverlay(indexScene, image) {
      image.y = image.displayHeight;
  
      game.scene.scenes[indexScene].tweens.add({
          targets: image,
          y: -image.displayHeight,
          duration: 100
      });
  };
  
  // add text overlay
  export function placingTextOverlay(image) {
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.03;
      image.scaleX = image.scaleY;        
      image.setPosition(game.config.inputGamepadEventTarget.innerWidth / 2 - image.displayWidth / 2, image.displayHeight * 1.1);
  };
  
  export function moveDownTextOverlay(indexScene, image) {
      image.y = -image.displayHeight;
  
      setTimeout(() => {
          game.scene.scenes[indexScene].tweens.add({
              targets: image,
              y: image.displayHeight * 1.1,
              duration: 100
          });
      }, 2000);
  };
  
  export function moveUpTextOverlay(indexScene, image) {
      image.y = image.displayHeight * 1.1;
  
      game.scene.scenes[indexScene].tweens.add({
          targets: image,
          y: -image.displayHeight,
          duration: 100
      });
  };
  
  // add text block
  export function placingTextBlock(image) {
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.17;
      image.scaleX = image.scaleY;        
      image.setPosition(game.config.inputGamepadEventTarget.innerWidth / 2, game.config.inputKeyboardEventTarget.innerHeight / 2.1);
  };
  
  export function appearanceTextBlock(indexScene, image) {
      image.displayWidth = 0;
      image.displayHeight = 0;
  
      game.scene.scenes[indexScene].tweens.add({
          targets: image,
          displayHeight: game.config.inputGamepadEventTarget.innerHeight * 0.17,
          displayWidth: game.config.inputGamepadEventTarget.innerHeight * 0.51548387,
          duration: 100
      });
  };
  
  export function disappearanceCenter(indexScene, image) {
      game.scene.scenes[indexScene].tweens.add({
          targets: image,
          displayWidth: 0,
          displayHeight: 0,
          duration: 100
      });
  };
  
  // add text center
  export function placingCenterText(image) {
      image.displayHeight = game.config.inputGamepadEventTarget.innerHeight * 0.08;
      image.scaleX = image.scaleY;        
      image.setPosition(game.config.inputGamepadEventTarget.innerWidth / 2 - image.displayWidth / 2, game.config.inputKeyboardEventTarget.innerHeight / 2.2);
  };
  
  export function appearanceText(indexScene, image, scaleHeight) {
      image.displayWidth = 0;
      image.displayHeight = 0;
  
      game.scene.scenes[indexScene].tweens.add({
          targets: image,
          displayHeight: game.config.inputGamepadEventTarget.innerHeight * scaleHeight,
          displayWidth: game.config.inputGamepadEventTarget.innerHeight * scaleHeight * 4.2,
          duration: 100
      });
  };
  
  // add animation
  export function eventAnimation(animation) {
      let x = 0;  
  const intervalID = setInterval(() => {  
    if (++x === 6) {  
      window.clearInterval(intervalID);  
    }  
    animation.visible ? animation.visible = false : animation.visible = true  
  }, 125);
  };
  
  