MechBayScreen.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #ifndef MECHBAYSCREEN_H
  2. #define MECHBAYSCREEN_H
  3. /*************************************************************************************************\
  4. MechBayScreen.h : Header file for mech selection
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. #include "LogisticsScreen.h"
  10. #include "AttributeMeter.h"
  11. #include "MechListBox.h"
  12. #include "SimpleComponentListBox.h"
  13. class LogisticsMech;
  14. class LogisticsMechIcon;
  15. class SimpleCamera;
  16. #define ICON_COUNT 12
  17. #define ICON_COUNT_X 4
  18. #define ICON_COUNT_Y 3
  19. #define MB_MSG_NEXT 50
  20. #define MB_MSG_PREV 51
  21. #define MB_MSG_ADD 52
  22. #define MB_MSG_REMOVE 53
  23. #define MB_MSG_BUY 54
  24. #define MB_MSG_CHANGE_LOADOUT 55
  25. #define MB_MSG_BUY_SELL 56
  26. #define MB_MSG_MAINMENU 57
  27. class MechBayScreen : public LogisticsScreen
  28. {
  29. public:
  30. static MechBayScreen* instance(){ return s_instance; }
  31. MechBayScreen();
  32. virtual ~MechBayScreen();
  33. void init(FitIniFile* file);
  34. virtual void render(int xOffset, int yOffset);
  35. virtual void update();
  36. virtual void begin();
  37. virtual void end();
  38. virtual int handleMessage( unsigned long, unsigned long );
  39. void setMech( LogisticsMech* pMech, bool bCommandFromLB = true );
  40. void beginDrag( LogisticsMech* pMech );
  41. private:
  42. LogisticsMech* pCurMech;
  43. LogisticsMech* pDragMech;
  44. LogisticsMechIcon* pIcons;
  45. aObject dragIcon;
  46. bool dragLeft;
  47. long forceGroupCount;
  48. AttributeMeter attributeMeters[3];
  49. MechListBox mechListBox;
  50. aListBox componentListBox;
  51. aObject dropWeightMeter;
  52. aAnimation addWeightAnim;
  53. long addWeightAmount;
  54. aAnimation removeWeightAnim;
  55. long removeWeightAmount;
  56. long weightCenterX;
  57. long weightCenterY;
  58. long weightStartColor;
  59. long weightEndColor;
  60. static MechBayScreen* s_instance;
  61. SimpleCamera* mechCamera;
  62. ComponentListBox loadoutListBox;
  63. void removeSelectedMech();
  64. void addSelectedMech();
  65. void drawWeightMeter(long xOffset, long yOffset);
  66. void reinitMechs();
  67. MechBayScreen( const MechBayScreen& );
  68. MechBayScreen& operator=( const MechBayScreen& );
  69. void unselectDeploymentTeam();
  70. bool selectFirstFGItem();
  71. bool selectFirstViableLBMech();
  72. LogisticsMech* getFGSelMech();
  73. };
  74. #endif