MPSetupArea.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #ifndef MPSETUP_H
  2. #define MPSETUP_H
  3. /*************************************************************************************************\
  4. MPSetupArea.h : Interface for the MPSetupArea component.
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. //*************************************************************************************************
  10. #ifndef LOGISTICSSCREEN_H
  11. #include "LogisticsScreen.h"
  12. #endif
  13. #include "aSystem.h"
  14. #include "aListBox.h"
  15. #include "AttributeMeter.h"
  16. #include "SimpleCamera.h"
  17. #ifndef AANIM_H
  18. #include "aAnim.h"
  19. #endif
  20. class aButton;
  21. class aColorPicker : public aObject
  22. {
  23. public:
  24. aColorPicker();
  25. virtual long init(long xPos, long yPos, long w, long h);
  26. void init( FitIniFile* file, const char* blockName );
  27. virtual void destroy();
  28. virtual void render();
  29. virtual void update();
  30. virtual int handleMessage( unsigned long message, unsigned long who );
  31. virtual void move( float offsetX, float offsetY );
  32. void setColor0(int color);
  33. int getColor0() const { return color0; }
  34. void setColor1(int color);
  35. int getColor1() const { return color1; }
  36. protected:
  37. aRect mainRect;
  38. aText tab0text;
  39. aRect tab0ColorOutlineRect;
  40. aRect tab0ColorRect;
  41. aButton tab0Button;
  42. aText tab1text;
  43. aRect tab1ColorOutlineRect;
  44. aRect tab1ColorRect;
  45. aButton tab1Button;
  46. aObject colorPlaneStatic;
  47. aRect intensityGradientRect;
  48. mcScrollBar intesitySliderScrollBar;
  49. aObject colorPlaneCursorStatic;
  50. int color0;
  51. int color1;
  52. int activeTab;
  53. };
  54. class aStyle1TextListItem : public aTextListItem
  55. {
  56. public:
  57. aStyle1TextListItem() { hasAnimation = false; normalColor = 0xff808080; }
  58. virtual long init( FitIniFile* file, const char* blockName );
  59. virtual void render();
  60. protected:
  61. bool hasAnimation;
  62. aAnimGroup animGroup;
  63. int normalColor;
  64. };
  65. class aInsigniaListItem : public aListItem
  66. {
  67. public:
  68. aInsigniaListItem() { ; }
  69. virtual long init( FitIniFile* file, const char* blockName );
  70. virtual void update();
  71. protected:
  72. aObject graphic;
  73. aStyle1TextListItem text;
  74. };
  75. class MPSetupXScreen : public LogisticsScreen
  76. {
  77. public:
  78. MPSetupXScreen();
  79. virtual ~MPSetupXScreen();
  80. void init(FitIniFile* file);
  81. bool isDone();
  82. virtual void begin();
  83. virtual void end();
  84. virtual void render( int xOffset, int yOffset );
  85. virtual void render();
  86. virtual void update();
  87. virtual int handleMessage( unsigned long, unsigned long );
  88. void updateMPSetup(); // put into inventory
  89. bool bDone;
  90. void **ppConnectionScreen;
  91. void *pLocalBrowserScreen;
  92. void *pDirectTcpipScreen;
  93. void *pModem2ModemScreen;
  94. private:
  95. int indexOfButtonWithID(int id);
  96. aComboBox playerNameComboBox;
  97. aComboBox unitNameComboBox;
  98. aDropList insigniaDropList;
  99. aColorPicker colorPicker;
  100. int baseColor;
  101. int stripeColor;
  102. SimpleCamera mechCamera;
  103. bool bPaintSchemeInitialized;
  104. };
  105. //*************************************************************************************************
  106. #endif // end of file ( MPSetupArea.h )