LogisticsScreen.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. #ifndef LOGISTICSSCREEN_H
  2. #define LOGISTICSSCREEN_H
  3. /*************************************************************************************************\
  4. LogisticsScreen.h : Interface for the LogisticsScreen component.
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. #include "aSystem.h"
  10. //*************************************************************************************************
  11. class FitIniFile;
  12. class aObject;
  13. class aRect;
  14. class aText;
  15. class aAnimButton;
  16. class aButton;
  17. class aEdit;
  18. class aAnimObject;
  19. /**************************************************************************************************
  20. CLASS DESCRIPTION
  21. LogisticsScreen:
  22. **************************************************************************************************/
  23. class LogisticsScreen : public aObject
  24. {
  25. public:
  26. enum Status
  27. {
  28. RUNNING = 0,
  29. NEXT = 1,
  30. PREVIOUS = 2,
  31. DONE = 3,
  32. PAUSED = 4,
  33. UP,
  34. DOWN,
  35. YES,
  36. NO,
  37. MAINMENU,
  38. RESTART,
  39. MULTIPLAYERRESTART,
  40. SKIPONENEXT,
  41. SKIPONEPREVIOUS,
  42. FADEDOWN,
  43. FADEUP,
  44. READYTOLOAD,
  45. GOTOSPLASH
  46. };
  47. LogisticsScreen();
  48. virtual ~LogisticsScreen();
  49. LogisticsScreen( const LogisticsScreen& src );
  50. LogisticsScreen& operator=( const LogisticsScreen& src );
  51. void init(FitIniFile& file, const char* staticName, const char* textName, const char* rectName,
  52. const char* buttonName, const char* editName = "Edit",
  53. const char* animObjectName = "AnimObject", DWORD neverFlush = 0 );
  54. virtual void update();
  55. virtual void render();
  56. virtual void begin();
  57. virtual void end(){}
  58. virtual void render( int xOffset, int yOffset );
  59. long getStatus();
  60. aButton* getButton( long who );
  61. aRect* getRect( long who );
  62. virtual void moveTo( long xPos, long yPos );
  63. virtual void move( long xPos, long yPos );
  64. bool inside( long x, long y);
  65. void beginFadeIn( float fNewTime ){ fadeInTime = fNewTime; fadeOutTime = fadeTime = 0.f; }
  66. void beginFadeOut( float fNewTime ) { fadeInTime = 0.f; fadeOutTime = fNewTime; fadeTime = 0.f; }
  67. void clear(); // remove everything
  68. aObject* statics;
  69. aRect* rects;
  70. long rectCount;
  71. long staticCount;
  72. aText* textObjects;
  73. long textCount;
  74. aAnimButton* buttons;
  75. long buttonCount;
  76. aEdit* edits;
  77. long editCount;
  78. aAnimObject* animObjects;
  79. long animObjectsCount;
  80. float fadeInTime;
  81. float fadeOutTime;
  82. float fadeTime;
  83. protected:
  84. long status;
  85. long fadeOutMaxColor;
  86. long helpTextArrayID;
  87. private:
  88. void copyData( const LogisticsScreen& );
  89. void destroy();
  90. };
  91. //*************************************************************************************************
  92. #endif // end of file ( LogisticsScreen.h )