#include "GameState.h"

void GameState :: gamestateCreditsAfterDraw(uint8_t numberOfButtons)
{
  inputBufferIterator = inputBuffer.begin ();
  while (inputBufferIterator < inputBuffer.end ())
    {
      if (inputBufferIterator -> getInput () == INPUT_MOUSEUP)
        {
          clearButtons (numberOfButtons);
          if (isMouseOnHotSpot((*inputBufferIterator), buttonVect[0], false))
            setNewGameState (GAMESTATE_MAIN_MENU);
        }
      if (inputBufferIterator -> getInput () == INPUT_MOUSEDOWN)
        {
          buttonUpdateClickStatus ((*inputBufferIterator), numberOfButtons);
        }
      if (inputBufferIterator -> getInput () == INPUT_QUITGAME)
        {
          addQuitCommand ();
        }
      inputBufferIterator ++;
    }
}
