#include "GameState.h"

void GameState :: gamestateChooseYourCharacterAfterDraw(uint8_t numButtonsToUse)
{
  inputBufferIterator = inputBuffer.begin ();
  while (inputBufferIterator < inputBuffer.end ())
    {
      if (inputBufferIterator -> getInput () == INPUT_MOUSEUP)
        {
          clearButtons (numButtonsToUse);

          if (isMouseOnHotSpot((*inputBufferIterator), buttonVect[0], false))
            {
              rulez.newPlayer (1); //class choice here
              setNewGameState (GAMESTATE_CHOOSE_YOUR_INTRO_POWERS);
            }

          if (isMouseOnHotSpot((*inputBufferIterator), buttonVect[1], false))
            {
              rulez.newPlayer (2); //class choice here
              setNewGameState (GAMESTATE_CHOOSE_YOUR_INTRO_POWERS);
            }

          if (isMouseOnHotSpot((*inputBufferIterator), buttonVect[2], false))
            {
              rulez.newPlayer (3); //class choice here
              setNewGameState (GAMESTATE_CHOOSE_YOUR_INTRO_POWERS);
            }

          if (isMouseOnHotSpot((*inputBufferIterator), buttonVect[3], false))
            {
              rulez.newPlayer (4); //class choice here
              setNewGameState (GAMESTATE_CHOOSE_YOUR_INTRO_POWERS);
            }
        }
      if (inputBufferIterator -> getInput () == INPUT_MOUSEDOWN)
        {
          buttonUpdateClickStatus ((*inputBufferIterator), numButtonsToUse);
        }
      if (inputBufferIterator -> getInput () == INPUT_QUITGAME)
        {
          addQuitCommand ();
        }

      inputBufferIterator ++;
    }
}
