00001 #ifndef HEADER_MENUOPTIONS_H 00002 #define HEADER_MENUOPTIONS_H 00003 00004 class Picture; 00005 class MouseStroke; 00006 class IWidget; 00007 class WiStatusBar; 00008 class Labels; 00009 00010 #include "GameState.h" 00011 #include "Drawable.h" 00012 00013 /** 00014 * Options menu which allow to set lang and tune volume. 00015 */ 00016 class MenuOptions : public GameState, public Drawable { 00017 private: 00018 IWidget *m_container; 00019 WiStatusBar *m_statusBar; 00020 bool m_needRefresh; 00021 private: 00022 void prepareMenu(); 00023 IWidget *createSoundPanel(const Labels &labels); 00024 IWidget *createMusicPanel(const Labels &labels); 00025 IWidget *createLangPanel(const Labels &labels); 00026 IWidget *createSpeechPanel(const Labels &labels); 00027 IWidget *createSubtitlesPanel(const Labels &labels); 00028 IWidget *createBackButton(const Labels &labels); 00029 WiStatusBar *createStatusBar(int width); 00030 protected: 00031 virtual void own_initState(); 00032 virtual void own_updateState(); 00033 virtual void own_pauseState() {} 00034 virtual void own_resumeState(); 00035 virtual void own_cleanState() {} 00036 public: 00037 MenuOptions(); 00038 virtual ~MenuOptions(); 00039 virtual const char *getName() const { return "state_options"; }; 00040 virtual bool allowBg() const { return true; } 00041 00042 void mouseButton(const MouseStroke &stroke); 00043 virtual void drawOn(SDL_Surface *screen); 00044 00045 void receiveString(const StringMsg *msg); 00046 }; 00047 00048 #endif