MPPrefs.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #ifndef MPPREFS_H
  2. #define MPPREFS_H
  3. /*************************************************************************************************\
  4. MPPrefs.h : Interface for the MPPrefs component.
  5. //---------------------------------------------------------------------------//
  6. // Copyright (C) Microsoft Corporation. All rights reserved. //
  7. //===========================================================================//
  8. \*************************************************************************************************/
  9. #ifndef LOGISTICSSCREEN_H
  10. #include "LogisticsScreen.h"
  11. #endif
  12. #ifndef ALISTBOX_H
  13. #include "AListBox.h"
  14. #endif
  15. #ifndef SIMPLECAMERA_H
  16. #include "SimpleCamera.h"
  17. #endif
  18. class FitIniFile;
  19. struct _MC2Player;
  20. //*************************************************************************************************
  21. /**************************************************************************************************
  22. CLASS DESCRIPTION
  23. MPPrefs:
  24. **************************************************************************************************/
  25. class MPPrefs: public LogisticsScreen
  26. {
  27. public:
  28. MPPrefs();
  29. virtual ~MPPrefs();
  30. static MPPrefs* instance(){ return s_instance; }
  31. int init( FitIniFile& file );
  32. virtual void update();
  33. virtual void render( int OffsetX, int OffsetY );
  34. virtual int handleMessage( unsigned long message, unsigned long who );
  35. virtual void begin();
  36. virtual void end();
  37. void initColors();
  38. void saveSettings();
  39. void cancelSettings();
  40. void setMechColors( unsigned long base, unsigned long highlight ); // called by MPlayer when it resets a color
  41. private:
  42. MPPrefs( const MPPrefs& src );
  43. MPPrefs& operator=( const MPPrefs& PPrefs );
  44. aComboBox comboBox[3];
  45. SimpleCamera camera;
  46. aObject insigniaBmp; // the one inside the combo box...
  47. // HELPERS
  48. void updateStripeColors(const _MC2Player* players, long playerCount, bool bDrawRect );
  49. void updateBaseColors( const _MC2Player* players, long playerCount, bool bDrawRect);
  50. char getColorIndex( unsigned long color );
  51. void setColor( unsigned long color );
  52. void setHighlightColor( unsigned long color );
  53. static MPPrefs* s_instance;
  54. };
  55. class aBmpListItem : public aListItem
  56. {
  57. public:
  58. int setBmp( const char* pFileName );
  59. const char* getBmp(){ return fileName; }
  60. private:
  61. aObject bmp;
  62. EString fileName;
  63. };
  64. //*************************************************************************************************
  65. #endif // end of file ( MPPrefs.h )