//
// credits.cpp
//
// "credits" screen
//
//
// Author: Tomi Belan <tomi.belan@gmail.com>, (C) 2006
//
// Copyright: See COPYING file that comes with this distribution
//
//

#include <string>
#include "credits.h"
#include "mainmenu.h"
#include "main.h"

Credits::Credits()
{
}

Credits::~Credits()
{
}
  
void Credits::event(SDL_Event *e)
{
  if(e->type == SDL_KEYDOWN) {
    int sym = e->key.keysym.sym;
    if(sym == SDLK_ESCAPE || sym == SDLK_RETURN || sym == SDLK_SPACE)
      newProgramMode = new MainMenu();
  }
  if(e->type == SDL_MOUSEBUTTONUP)
    newProgramMode = new MainMenu();
}

void Credits::activate()
{
  SDL_FillRect(screen, &screen->clip_rect, SDL_MapRGB(screen->format, 0, 0, 0));
  simpleText("This program was made by:", -2);
  simpleText("Tomi Belan", 0);
  simpleText("Alexander Mravcak", 1);
  simpleText("Michal Matlon", 2);
  SDL_Flip(screen);
}

