home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / thx / demos / skyscrap / build / menu.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-13  |  940 b   |  51 lines

  1. #ifndef __menu_h
  2. #define __menu_h
  3.  
  4. #include <theatrix.h>
  5. #include "ss.h"
  6.  
  7. const int MENUGFXITEMS=6;
  8.  
  9. const int PLAY   =1;
  10. const int PLAYSEL=2;
  11. const int HELP   =3;
  12. const int HELPSEL=4;
  13. const int QUIT   =5;
  14. const int QUITSEL=6;
  15.  
  16. const int SWITCH=1;
  17.  
  18. class MenuItem : public Performer
  19. {
  20.   protected:
  21.     int x, y, image;
  22.   public:
  23.     MenuItem( Director* d, int X, int Y, int Image );
  24.     void initialize();
  25.     void display();
  26.     void playSwitchSound();
  27. };
  28.  
  29. class Menu : public VideoDirector
  30. {
  31.   private:
  32.     int CurSelection;
  33.     MenuItem* item[MENUGFXITEMS+1];
  34.   public:
  35.     Menu();
  36.     ~Menu();
  37.     const Type_info& get_next_director();
  38.     void initialize();
  39.     void display();
  40.     void UpdateScreen(void);
  41.     void onUp(int);
  42.     void onDown(int);
  43.     void onEnter(int);
  44.     void onEscape(int);
  45.     void onPlay(int);
  46.     void onHelp(int);
  47.     void onQuit(int);
  48. };
  49.  
  50. #endif //__menu_h
  51.