PauseWindow.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #ifndef PAUSEWINDOW_H
  2. #define PAUSEWINDOW_H
  3. /*************************************************************************************************\
  4. PauseWindow.h : Interface for the PauseWindow component.
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. //*************************************************************************************************
  10. class ControlButton;
  11. struct ButtonData;
  12. class StaticInfo;
  13. class FitIniFile;
  14. #include "utilities.h"
  15. #ifndef AFONT_H
  16. #include "aFont.h"
  17. #endif
  18. /**************************************************************************************************
  19. CLASS DESCRIPTION
  20. PauseWindow:
  21. **************************************************************************************************/
  22. struct MoveInfo
  23. {
  24. float time; // in seconds
  25. float position; // x pixels
  26. };
  27. class PauseWindow
  28. {
  29. public:
  30. PauseWindow();
  31. ~PauseWindow();
  32. void update();
  33. void render();
  34. void init( FitIniFile& file );
  35. void handleClick( int ID );
  36. bool inRect( int mouseX, int mouseY );
  37. void begin(){ currentTime = 0.f; }
  38. void end();
  39. void begin(bool objectivesOn);
  40. enum PAUSEBUTTONS
  41. {
  42. OBJECTIVES = 0,
  43. SAVE = 1,
  44. LOAD = 2,
  45. OPTIONS = 3,
  46. RESTART = 4,
  47. EXIT = 5,
  48. RETURN = 6
  49. };
  50. private:
  51. ControlButton* buttons;
  52. ButtonData* buttonData;
  53. long buttonCount;
  54. StaticInfo* statics;
  55. long staticCount;
  56. GUI_RECT backgrounds[2];
  57. float finalReference;
  58. float currentPos;
  59. float currentTime;
  60. aFont font;
  61. aFont headerFont;
  62. bool wasDragging;
  63. bool objectivesAlreadyOn;
  64. static MoveInfo moveInfo[8];
  65. bool bPromptToQuit;
  66. bool bPromptToAbort;
  67. };
  68. //*************************************************************************************************
  69. #endif // end of file ( PauseWindow.h )