#include "GSDone.h"
#include "BirdiesRevenge.h"



IMPLEMENT_CLONEABLE( CGSDone, "GSDone" )



void CGSDone::Init()
{
  m_Menu.Add( 11 );

  m_Menu.SetValues( GR::tPoint( 400, 500 ) );
}



void CGSDone::Exit()
{
}



void CGSDone::Display( XRenderer& Renderer )
{
  theApp.RenderBackground( Renderer, "BG.2" );

  theApp.PrintTextCentered( 400, 100, "WELL DONE" );
  theApp.PrintTextCentered( 400, 120, "YOU DEFEATED THE EVIL PUMPKIN LORD!" );

  theApp.PrintTextCentered( 400, 240, "SORRY THERE IS NOT MUCH OF AN ENDING." );
  theApp.PrintTextCentered( 400, 260, "HOPE YOU HAD FUN!" );
  theApp.PrintTextCentered( 400, 300, "PRESS E IN MENU FOR THE EDITOR" );

  m_Menu.Display( Renderer );
}



void CGSDone::UpdatePerDisplayFrame( const float ElapsedTime )
{
  if ( !IsActivelyUpdating() )
  {
    return;
  }
  if ( theApp.InputClass()->ReleasedKeyPressed( Xtreme::KEY_ESCAPE ) )
  {
    ChangeState( "GSMenu" );
  }

  m_Menu.Update( ElapsedTime );
  if ( m_Menu.Done() )
  {
    m_Menu.SetUndone();
    switch ( m_Menu.SelectedItem() )
    {
      case 11:
        ChangeState( "GSMenu" );
        break;
    }
  }
}



void CGSDone::Update()
{

  // TODO - Update

}



bool CGSDone::ProcessEvent( const GUI::OutputEvent& Event )
{
  switch ( Event.Type )
  {
    case OET_BUTTON_PUSHED:
      break;
  }
  return false;
}
