#include "SM_CommonFXPCH.h"
#include "SM_Engine3DPCH.h"
#include "SM_Keyboard.h"
#include "SM_DemoEffect.h"
#include "SM_Main.h"


char* NombreTextos[]=
{
    "TEXT_00",
    "TEXT_01",
};

#define NTEXTOS 2
int     iActiveText=0;


class RotulosFX : public SM_DemoEffect
{
public:              

  CKeyboardHandler  m_Keyboard;

  RotulosFX(char const* pcName) : SM_DemoEffect(pcName)
  {
  }

  virtual          ~RotulosFX()
  {
  }

  int      Init(const char* pcCommand)
  {
    m_Keyboard.Init();
    SM_Main::SetKeyboardHandler(&m_Keyboard);
    return (0);
  }

  int      Shutdown()
  {
    SM_Main::SetKeyboardHandler(0);
    m_Keyboard.Shutdown();
    return (0);
  }

  int      Start(float fTime)
  {
    return (0);
  }

  int      Stop()
  {
    return (0);
  }

  int      Reset()
  {
    return (0);
  }

  int      InputChar()
  {
      int i;

      for (i='A' ; i<='Z' ; i++)
      {
          if (m_Keyboard.IsPressed(i))
          {
              return i;
          }
      }

      return -1;
  };

  int      Run(float fTime)
  {
    if (InputChar()=='A')
    {
        

    }
    return (1);
  }

  int      Command           (float fTime, const char* pcCommand)
  {
    return (0);
  }  
};


DEFINE_EFFECT(RotulosFX)
RotulosFX Rotulo("ROTULOS");
