// $Id: titlescreendisplay.h,v 1.6 2006/08/23 22:43:17 matthew Exp $ // Fish Supper // Copyright (C) 2006 Matthew Clarke // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. #ifndef _TITLE_SCREEN_DISPLAY_H_ #define _TITLE_SCREEN_DISPLAY_H_ #include "SDL.h" #include "enums.h" namespace FS { class TitleScreenDisplay { public: static const int NUM_SELECTIONS = 4; enum Selection { PLAY, SETTINGS, HI_SCORES, QUIT, NONE }; private: static const int NUM_OPTIONS = 4; static const int OPTIONS_X = 450; int options_ys[NUM_OPTIONS]; char * options_strings[NUM_OPTIONS]; int options_strings_widths[NUM_OPTIONS]; SDL_Rect dirty_rects[2]; // for new and old selections int current_selection; int old_selection; SDL_Surface * backdrop; SDL_Surface * screen; // from GameManager void redraw_options(); public: TitleScreenDisplay(SDL_Surface * s); ~TitleScreenDisplay(); // use this to free SDL surfaces? void redraw(); // in future a base class in Display? Selection update(KeyboardEvent * events, int n); }; // class TitleScreenDisplay } // namespace FS #endif