123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 |
- #ifndef LOGISTICSDIALOG_H
- #define LOGISTICSDIALOG_H
- /*************************************************************************************************\
- LogisticsDialog.h : Interface for the LogisticsDialog component.
- //---------------------------------------------------------------------------//
- // Copyright (C) Microsoft Corporation. All rights reserved. //
- //===========================================================================//
- \*************************************************************************************************/
- #ifndef LOGISTICSSCREEN_H
- #include "LogisticsScreen.h"
- #endif
- #ifndef AANIM_H
- #include "AAnim.h"
- #endif
- #ifndef ALISTBOX_H
- #include "aListBox.h"
- #endif
- //*************************************************************************************************
- /**************************************************************************************************
- CLASS DESCRIPTION
- LogisticsDialog:
- **************************************************************************************************/
- class LogisticsDialog: public LogisticsScreen
- {
- public:
- virtual void render();
- virtual void update();
- void begin();
- void end();
- bool isDone() { return bDone; }
- void setFont( int newFontResID );
- LogisticsDialog();
- protected:
- aAnimation enterAnim;
- aAnimation exitAnim;
- bool bDone;
- int oldFont;
- };
- class LogisticsOKDialog : public LogisticsDialog
- {
- public:
- static LogisticsOKDialog* instance(){ return s_instance; }
- LogisticsOKDialog();
-
- virtual int handleMessage( unsigned long, unsigned long );
- static int init( FitIniFile& file );
- void setText( int textID, int CancelButton, int OKButton );
- void setText( const char* mainText );
- private:
- LogisticsOKDialog( const LogisticsOKDialog& src );
- virtual ~LogisticsOKDialog();
- LogisticsOKDialog& operator=( const LogisticsOKDialog& ogisticsDialog );
- static LogisticsOKDialog* s_instance;
- friend void endDialogs();
- };
- class LogisticsOneButtonDialog : public LogisticsDialog
- {
- public:
- static LogisticsOneButtonDialog* instance(){ return s_instance; }
- LogisticsOneButtonDialog();
-
- virtual int handleMessage( unsigned long, unsigned long );
- static int init( FitIniFile& file );
- void setText( int textID, int CancelButton, int OKButton );
- void setText( const char* mainText );
- protected:
- LogisticsOneButtonDialog( const LogisticsOneButtonDialog& src );
- virtual ~LogisticsOneButtonDialog();
- LogisticsOneButtonDialog& operator=( const LogisticsOneButtonDialog& ogisticsDialog );
- static LogisticsOneButtonDialog* s_instance;
- friend void endDialogs();
- };
- class LogisticsLegalDialog : public LogisticsOneButtonDialog
- {
- public:
-
- static LogisticsLegalDialog* instance(){ return s_instance; }
- static int init( FitIniFile& file );
- LogisticsLegalDialog(){}
- private:
- LogisticsLegalDialog( const LogisticsLegalDialog& src );
- virtual ~LogisticsLegalDialog(){}
- LogisticsLegalDialog& operator=( const LogisticsLegalDialog& ogisticsDialog );
- static LogisticsLegalDialog* s_instance;
- friend void endDialogs();
- };
- class LogisticsSaveDialog : public LogisticsDialog
- {
- public:
- static LogisticsSaveDialog* instance(){ return s_instance; }
- LogisticsSaveDialog();
- virtual void begin();
- virtual void beginLoad();
- void beginCampaign();
- virtual void end();
- virtual void update();
- virtual void render();
-
- static int init( FitIniFile& file );
- virtual int handleMessage( unsigned long, unsigned long );
- const EString& getFileName( ){ return selectedName; }
- private:
- LogisticsSaveDialog( const LogisticsSaveDialog& src );
- virtual ~LogisticsSaveDialog();
- LogisticsSaveDialog& operator=( const LogisticsSaveDialog& ogisticsDialog );
- static LogisticsSaveDialog* s_instance;
- aListBox gameListBox;
- EString selectedName;
- void initDialog(const char* path, bool bCampaign);
- void updateCampaignMissionInfo();
- void setMission( const char* path );
- void readCampaignNameFromFile( char* fileName, char* resultName, long len );
- bool isCorrectVersionSaveGame( char *fileName );
- bool bPromptOverwrite;
- bool bDeletePrompt;
- bool bLoad;
- bool bCampaign;
- void updateMissionInfo();
- aLocalizedListItem templateItem;
-
- friend void endDialogs();
- };
- class LogisticsVariantDialog : public LogisticsDialog
- {
- public:
- LogisticsVariantDialog();
- ~LogisticsVariantDialog();
- static LogisticsVariantDialog* instance(){ return s_instance; }
- virtual void begin();
- void beginTranscript();
- virtual void end();
- virtual void update();
- virtual void render();
-
- int init( FitIniFile& file );
- virtual int handleMessage( unsigned long, unsigned long );
- const EString& getFileName( ){ return selectedName; }
- protected:
- static LogisticsVariantDialog* s_instance;
- aListBox gameListBox;
- EString selectedName;
- bool bPromptOverwrite;
- bool bDeletePrompt;
- bool bTranscript;
- void initVariantList();
- void initTranscript();
- aAnimTextListItem templateItem;
- friend void endDialogs();
- };
- class LogisticsAcceptVariantDialog : public LogisticsVariantDialog
- {
- public:
- LogisticsAcceptVariantDialog();
- ~LogisticsAcceptVariantDialog();
- virtual void begin();
- virtual void end();
- virtual void update();
- virtual void render();
-
- int init( FitIniFile& file );
- virtual int handleMessage( unsigned long, unsigned long );
-
- private:
- EString selectedName;
- bool bNameUsedPrompt;
- };
- class LogisticsMapInfoDialog : public LogisticsDialog
- {
- public:
- LogisticsMapInfoDialog();
- ~LogisticsMapInfoDialog();
- virtual void end();
- void setMap( const char* pFileName );
-
- int init( );
- virtual int handleMessage( unsigned long, unsigned long );
-
- private:
-
- };
- //*************************************************************************************************
- #endif // end of file ( LogisticsDialog.h )
|