home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / XenonSource.exe / xenon / includes / messageboxstate.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-07-16  |  1.2 KB  |  59 lines

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    CMessageBoxState
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    06/05/00
  8. //
  9. // Base:    CGameState
  10. //
  11. // Derived:    None
  12. //
  13. //-------------------------------------------------------------
  14.  
  15. #ifndef _INCLUDE_MESSAGEBOXSTATE_H
  16. #define _INCLUDE_MESSAGEBOXSTATE_H
  17.  
  18. #include "gamestate.h"
  19.  
  20. //-------------------------------------------------------------
  21.  
  22. class CMessageBoxState : public CGameState
  23. {
  24.     private:
  25.  
  26.         static CMessageBoxState *m_instance;
  27.  
  28.         gsCMenu m_menu;
  29.  
  30.         typedef enum {
  31.             MB_YES,
  32.             MB_NO,
  33.         } MessageBoxItem;
  34.  
  35.         static const char *m_message;
  36.         static const char *m_yes_option;
  37.         static const char *m_no_option;
  38.         static CGameState *m_yes_state;
  39.         static CGameState *m_no_state;
  40.         static bool m_restart;
  41.  
  42.     public:
  43.         CMessageBoxState();
  44.         ~CMessageBoxState();
  45.  
  46.         static CGameState *instance();
  47.  
  48.         static void setup(const char *message,const char *yes_option,CGameState *yes_state,
  49.                           const char *no_option,CGameState *no_state,bool restart_on_yes = false);
  50.  
  51.         bool create();
  52.         bool update();
  53. };
  54.  
  55. //-------------------------------------------------------------
  56.  
  57. #endif
  58.  
  59.