123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- #ifndef MPPARAMETERSCREEN_H
- #define MPPARAMETERSCREEN_H
- /*************************************************************************************************\
- MPParameterScreen.h : Interface for the MPParameterScreen component.
- //---------------------------------------------------------------------------//
- // Copyright (C) Microsoft Corporation. All rights reserved. //
- //===========================================================================//
- \*************************************************************************************************/
- //*************************************************************************************************
- #ifndef LOGISTICSSCREEN_H
- #include "LogisticsScreen.h"
- #endif
- #include "aSystem.h"
- #include "aListBox.h"
- #include "AttributeMeter.h"
- #include "SimpleCamera.h"
- #include "EList.h"
- #include "Multplyr.h"
- #include "MPLoadMap.h"
- #ifndef AANIM_H
- #include "aAnim.h"
- #endif
- struct _MC2Player;
- class aStyle2TextListItem : public aTextListItem
- {
- public:
- aStyle2TextListItem() { hasAnimation = false; normalColor = 0xff808080; }
- virtual long init( FitIniFile* file, const char* blockName );
- virtual void render();
- protected:
- bool hasAnimation;
- aAnimGroup animGroup;
- int normalColor;
-
- };
- class aPlayerParams : public aObject
- {
- public:
- aPlayerParams();
- ~aPlayerParams();
- aPlayerParams& operator=( const aPlayerParams& src );
- virtual long init(long xPos, long yPos, long w, long h);
- void init( FitIniFile* file, const char* blockName );
- virtual void destroy();
- virtual void render();
- virtual void update();
- virtual int handleMessage( unsigned long message, unsigned long who );
- virtual void move( float offsetX, float offsetY );
- void setData(const _MC2Player* data);
- bool hasFocus( );
- bool isSelected() { return bHasFocus; }
- int getCommanderID( ) const { return commanderID; }
- void disableReadyButton();
- protected:
- aAnimButton CBillsSpinnerUpButton;
- aAnimButton CBillsSpinnerDownButton;
- aAnimButton ReadyButton;
- aObject* statics;
- aRect* rects;
- long rectCount;
- long staticCount;
- aText* textObjects;
- long textCount;
- aDropList teamNumberDropList;
- aDropList factionDropList;
- aStyle2TextListItem templateItem;
- EString insigniaName;
- aEdit edit;
- bool bHasFocus;
- long commanderID;
- friend class MPParameterScreen;
- };
- class CListOfDropListPointers : public EList<aDropList *, aDropList *> {};
- class CFocusManager
- {
- public:
- enum control_species_data_type
- {
- CS_NONE,
- CS_DROPLIST
- };
- CFocusManager();
- void clear();
- void *registerDropList(aDropList &DropList);
- void unregisterDropList(aDropList &DropList);
- void update();
- bool somebodyHasTheFocus(); /*this is distinct from the keyboard input focus*/
- aObject *pControlThatHasTheFocus();
- private:
- control_species_data_type speciesOfTheControlWhichHasTheFocus;
- aDropList *pDropListThatHasTheFocus;
- CListOfDropListPointers listOfDropListPointers;
- };
- class MPParameterScreen : public LogisticsScreen
- {
- public:
-
- MPParameterScreen();
- virtual ~MPParameterScreen();
-
- void init(FitIniFile* file);
- virtual void begin();
- virtual void end();
- virtual void render( int xOffset, int yOffset );
- virtual void render();
- virtual void update();
- virtual int handleMessage( unsigned long, unsigned long );
-
- static void resetCheckBoxes();
- void setHostLeftDlg( const char* playerName);
- static GUID getGUIDFromFile( const char* fileName );
- static void initializeMap( const char* fileName );
- static MPParameterScreen* s_instance;
- private:
- int indexOfButtonWithID(int id);
-
- int chatToSend;
- void setMission( const char* fileName, bool resetData = 1 );
- void setMissionClientOnly( const char* pNewMapName );
- void checkVersionClientOnly( const char* pNewMapName );
- aPlayerParams playerParameters[MAX_MC_PLAYERS];
- long playerCount;
- MPLoadMap mpLoadMap;
- LogisticsMapInfoDialog mapInfoDlg;
- bool bLoading;
- bool bShowNoMapDlg;
- bool bErrorDlg;
- bool bBootDlg;
- bool bDisconnectDlg;
- EString mapName;
- long bootPlayerID;
- bool bMapInfoDlg;
- float delayTime;
- bool bHostLeftDlg;
- bool bWaitingToStart;
-
- };
- //*************************************************************************************************
- #endif // end of file ( MPParameterScreen.h )
|