Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields

optionsmenu.h

00001 /***************************************************************************
00002                           options.h  -  description
00003                              -------------------
00004     begin                : Tue Aug 12 2003
00005     copyright            : (C) 2003 by Gabor Torok
00006     email                : cctorok@yahoo.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef OPTIONSMENU_H
00019 #define OPTIONSMENU_H
00020 
00021 #include <string.h>
00022 #include "constants.h"
00023 #include "sdlhandler.h"
00024 #include "sdleventhandler.h"
00025 #include "sdlscreenview.h"
00026 #include "scourge.h"
00027 #include "userconfiguration.h"
00028 #include "util.h"
00029 #include "gui/window.h"
00030 #include "gui/button.h"
00031 #include "gui/scrollinglist.h"
00032 #include "gui/cardcontainer.h"
00033 #include "gui/multiplelabel.h"
00034 #include "gui/checkbox.h"
00035 #include "gui/slider.h"
00036 
00041 #define MAX_CONTROLS_LINE_SIZE 80
00042 
00043 class Scourge;
00044 class UserConfiguration;
00045 
00046 class OptionsMenu {
00047 private:
00048 
00049   char ** controlLines; // move it to function loadControls() ?
00050   Scourge *scourge;
00051   UserConfiguration * uc;
00052   bool showDebug;
00053   bool controlsLoaded;
00054   bool videoLoaded; 
00055   bool gameSettingsLoaded;
00056   int nbControlLines;
00057   bool waitingForNewKey;
00058   bool ignoreKeyUp;
00059     
00060   enum modeOptions {
00061     CONTROLS = 0, VIDEO, AUDIO, GAME_SETTINGS
00062   };
00063   int selectedMode; 
00064   
00065   Window *mainWin;  
00066   Button *controlsButton, *videoButton, *audioButton, *gameSettingsButton;
00067   Button *changeControlButton, *saveButton, *closeButton;
00068   Label * keyBindingsLabel; 
00069   Label * waitingLabel;  
00070   Label * changeTakeEffectLabel;
00071   
00072   MultipleLabel * gameSpeedML; 
00073   Checkbox * alwaysCenterMapCheckbox;
00074   Checkbox * keepMapSize;
00075   Checkbox * frameOnFullScreen;
00076   Checkbox * turnBasedBattle;
00077   Checkbox *ovalCutoutShown;
00078   Checkbox * alwaysShowPath;
00079   Checkbox *tooltipEnabled;
00080   Slider *tooltipInterval;
00081   
00082   MultipleLabel * videoResolutionML;  
00083   Checkbox * fullscreenCheckbox;
00084   Checkbox * doublebufCheckbox;   
00085   Checkbox * hwpalCheckbox;
00086   Checkbox * resizeableCheckbox;
00087   Checkbox * forceHwsurfCheckbox;
00088   Checkbox * forceSwsurfCheckbox;
00089   Checkbox * hwaccelCheckbox;
00090   Checkbox * stencilbufCheckbox;
00091   Checkbox * multitexturingCheckbox;
00092   MultipleLabel * shadowsML;
00093      
00094   CardContainer *cards;
00095   ScrollingList *controlBindingsList;
00096 
00097   Slider *musicVolume;
00098   Slider *effectsVolume;
00099 
00100   void setSelectedMode();
00101   void loadControls(); 
00102   void loadVideo();
00103   void loadGameSettings();
00104   
00105 public:
00106   OptionsMenu(Scourge *scourge);
00107   ~OptionsMenu();
00108 
00109   bool handleEvent(SDL_Event *event);
00110   bool handleEvent(Widget *widget, SDL_Event *event);
00111   //inline void show() { mainWin->setVisible(true); }
00112   void show();
00113   void hide();
00114   inline bool isVisible() { return mainWin->isVisible(); }    
00115 
00116  protected:
00117 };
00118 
00119 #endif

Generated on Thu Jun 16 21:50:43 2005 for scourge by  doxygen 1.4.0