mechlopedia.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. #ifndef MECHLOPEDIA_H
  2. #define MECHLOPEDIA_H
  3. /*************************************************************************************************\
  4. mechlopedia.h : Interface for the mechlopedia component.
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. #ifndef LOGISTICSSCREEN_H
  10. #include "LogisticsScreen.h"
  11. #endif
  12. #ifndef SIMPLECAMERA_H
  13. #include "SimpleCamera.h"
  14. #endif
  15. #ifndef ALISTBOX_H
  16. #include "aListBox.h"
  17. #endif
  18. #ifndef COMPONENTLISTBOX_H
  19. #include "SimpleComponentListBox.h"
  20. #endif
  21. #include "..\resource.h"
  22. class LogisticsChassis;
  23. class LogisticsVehicle;
  24. //*************************************************************************************************
  25. /**************************************************************************************************
  26. CLASS DESCRIPTION
  27. mechlopedia:
  28. **************************************************************************************************/
  29. class Mechlopedia : public LogisticsScreen
  30. {
  31. public:
  32. Mechlopedia();
  33. virtual ~Mechlopedia();
  34. int init();
  35. virtual int handleMessage( unsigned long, unsigned long );
  36. virtual void update();
  37. virtual void render();
  38. virtual void begin();
  39. private:
  40. LogisticsScreen* subScreens[6];
  41. int currentScreen;
  42. aListBox listBox;
  43. class SubScreen : public LogisticsScreen
  44. {
  45. public:
  46. void setListBox( aListBox* pLB ) {groupListBox = pLB; }
  47. int init( FitIniFile& file );
  48. virtual void update();
  49. virtual void select( aTextListItem* pEntry ){}
  50. virtual void end();
  51. virtual void setVehicle( bool bVehicle ){ }
  52. protected:
  53. aListBox* groupListBox;
  54. aListBox descriptionListBox;
  55. SimpleCamera camera;
  56. };
  57. class MechScreen : public SubScreen
  58. {
  59. public:
  60. void init();
  61. virtual void update();
  62. virtual void render();
  63. virtual void begin();
  64. virtual void select( aTextListItem* pEntry );
  65. void setMech( LogisticsVariant* pChassis, bool bShowJump );
  66. // set this before you call begin
  67. virtual void setVehicle( bool bVehicle ){ bIsVehicle = bVehicle; }
  68. void setVehicle( LogisticsVehicle* pVehicle );
  69. private:
  70. ComponentListBox compListBox;
  71. aListBox statsListBox;
  72. bool bIsVehicle;
  73. };
  74. class WeaponScreen : public SubScreen
  75. {
  76. public:
  77. void init();
  78. virtual void update();
  79. virtual void render();
  80. virtual void begin();
  81. virtual void select( aTextListItem* pEntry );
  82. void setWeapon ( LogisticsComponent* pWeapon );
  83. private:
  84. aListBox statsListBox;
  85. };
  86. class PersonalityScreen : public SubScreen
  87. {
  88. public:
  89. void init();
  90. virtual void update();
  91. virtual void render();
  92. virtual void begin();
  93. virtual void select( aTextListItem* pEntry );
  94. void setIsHistory( bool bTrue ) { bIsHistory = bTrue; }
  95. private:
  96. bool bIsHistory;
  97. };
  98. class BuildingScreen : public SubScreen
  99. {
  100. public:
  101. void init();
  102. virtual void update();
  103. virtual void render();
  104. virtual void begin();
  105. virtual void select( aTextListItem* pEntry );
  106. private:
  107. ComponentListBox compListBox;
  108. };
  109. // HELPER FUNCTIONS
  110. };
  111. /////////////////////////////////////////////////////
  112. class MechlopediaListItem: public aAnimTextListItem
  113. {
  114. public:
  115. MechlopediaListItem();
  116. virtual void render();
  117. static void init( );
  118. private:
  119. aObject bmp;
  120. aAnimGroup bmpAnim;
  121. static MechlopediaListItem* s_templateItem;
  122. };
  123. //*************************************************************************************************
  124. #endif // end of file ( mechlopedia.h )