ForceGroupBar.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef FORCEGROUPBAR_H
  2. #define FORCEGROUPBAR_H
  3. /*************************************************************************************************\
  4. ForceGroupBar.h : Interface for the ForceGroupBar component.
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. #ifndef MCLIB_H
  10. #include "MCLib.h"
  11. #endif
  12. //*************************************************************************************************
  13. class ForceGroupIcon;
  14. class Mover;
  15. class MechWarrior;
  16. class StaticInfo;
  17. #define MAX_ICONS 16
  18. #include "MechIcon.h"
  19. #define FORCEGROUP_TOP ForceGroupIcon::selectionRect[0].top
  20. /**************************************************************************************************
  21. CLASS DESCRIPTION
  22. ForceGroupBar:
  23. **************************************************************************************************/
  24. class ForceGroupBar
  25. {
  26. public:
  27. ForceGroupBar();
  28. ~ForceGroupBar();
  29. bool addMech( Mover* pMover );
  30. bool addVehicle( Mover* pMover );
  31. void removeMover (Mover* mover);
  32. void update();
  33. void render();
  34. void removeAll();
  35. bool inRegion( int x, int y );
  36. void init( FitIniFile& file, StaticInfo* pCoverIcon );
  37. void swapResolutions();
  38. int getIconCount(){ return iconCount; }
  39. bool setPilotVideo( const char* pVideo, MechWarrior* pPilot );
  40. bool isPlayingVideo();
  41. bool flashJumpers (long numFlashes);
  42. private:
  43. static float iconWidth;
  44. static float iconHeight;
  45. static int iconsPerRow;
  46. static StaticInfo* s_coverIcon;
  47. //Tutorial
  48. long forceNumFlashes;
  49. float forceFlashTime;
  50. int iconCount;
  51. ForceGroupIcon* icons[MAX_ICONS];
  52. friend class ControlGui;
  53. };
  54. //*************************************************************************************************
  55. #endif // end of file ( ForceGroupBar.h )