#include "LineEditor.h"
#include "Resource.h"
#include <string>

CXLineEditor::CXLineEditor(CXxPad *_parent)
{
  parent = _parent;
}

HRESULT CXLineEditor::Initialize()
{
  // Create texture for the image to persist
  m_pMainWindow = NULL;
  m_pMainWindow = parent->m_xprResource.GetTexture( resource_LineEditor_OFFSET );

  return S_OK;
}

HRESULT CXLineEditor::Render()
{
  D3DXVECTOR4 rect (106, 116, 528, 400);
  parent->RenderTile (rect, m_pMainWindow);

  return S_OK;
}

HRESULT CXLineEditor::Cleanup()
{
  return S_OK;
}

HRESULT CXLineEditor::FrameMove()
{
  if( parent->GetGamePad()->bPressedAnalogButtons[XINPUT_GAMEPAD_B] || parent->GetGamePad()->wPressedButtons & XINPUT_GAMEPAD_BACK)
  {
    parent->curMode = parent->MODE_NORMAL;
  }

  return S_OK;
}
