123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- #ifndef MPCONNECTIONTYPE_H
- #define MPCONNECTIONTYPE_H
- /*************************************************************************************************\
- MPConnectionType.h : Interface for the MPConnectionType component.
- //---------------------------------------------------------------------------//
- // Copyright (C) Microsoft Corporation. All rights reserved. //
- //===========================================================================//
- \*************************************************************************************************/
- //*************************************************************************************************
- #ifndef LOGISTICSSCREEN_H
- #include "LogisticsScreen.h"
- #endif
- #include "aSystem.h"
- #include "aButton.h"
- #include "aListBox.h"
- #ifndef AANIM_H
- #include "aAnim.h"
- #endif
- #ifndef MPHOSTGAME_H
- #include "MPHostGame.h"
- #endif
- #include "assert.h"
- static const int ZONE_PANEL_FIRST_BUTTON_ID = 1000100;
- class aZonePanel : public aObject
- {
- public:
- void init(FitIniFile* pFile, LogisticsScreen* pParent);
- virtual int handleMessage( unsigned long, unsigned long );
- virtual void update();
- virtual void render();
- private:
- LogisticsScreen *pParentScreen;
- aAnimButton button;
- aText text;
- bool bShowWarning;
- };
- static const int LAN_PANEL_FIRST_BUTTON_ID = 1000200;
- class aLanPanel : public aObject
- {
- public:
- aLanPanel(LogisticsScreen &refParentScreenParam)
- {
- pParentScreen = &refParentScreenParam;
- }
- void init(FitIniFile* pFile);
- virtual int handleMessage( unsigned long, unsigned long );
- virtual void update();
- private:
- LogisticsScreen *pParentScreen;
- aAnimButton button0;
- aAnimButton button1;
- aText text;
- };
- static const int TCPIP_PANEL_FIRST_BUTTON_ID = 1000300;
- class aTcpipPanel : public aObject
- {
- public:
- aTcpipPanel(LogisticsScreen &refParentScreenParam)
- {
- pParentScreen = &refParentScreenParam;
- connectingTime = 0.f;
- }
- void init(FitIniFile* pFile);
- virtual void destroy();
- virtual int handleMessage( unsigned long, unsigned long );
- virtual void update();
- virtual void render();
- virtual void begin();
- private:
- long getNum( char* pStr, long index1, long index2 );
- LogisticsScreen *pParentScreen;
- aAnimButton button0;
- aAnimButton button1;
- aText text0;
- aText text1;
- aRect helpRect;
- aComboBox comboBox;
- bool bConnectingDlg;
- float connectingTime;
- bool bErrorDlg;
- bool bExpanded;
- bool bFoundConnection;
- };
- class MPConnectionType : public LogisticsScreen
- {
- public:
-
- MPConnectionType();
- virtual ~MPConnectionType();
-
- void init(FitIniFile* file);
- bool isDone();
- 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 );
- bool bDone;
- void **ppConnectionScreen;
- void *pLocalBrowserScreen;
- void *pDirectTcpipScreen;
- void *pMPPlaceHolderScreen;
- void *pMPHostGame;
- private:
- int indexOfButtonWithID(int id);
- aZonePanel zonePanel;
- aLanPanel lanPanel;
- aTcpipPanel tcpipPanel;
- aObject *pPanel;
- MPHostGame hostDlg;
- bool bHosting;
- };
- class MPPlaceHolderScreen : public LogisticsScreen
- {
- public:
-
- //MPPlaceHolderScreen();
- //virtual ~MPPlaceHolderScreen();
-
- virtual void begin() { status = RUNNING; }
- //virtual void end();
- virtual void render( int xOffset, int yOffset ) {
- static int lastXOffset = 0;
- static int lastYOffset = 0;
- if ((0 == xOffset) && (0 == yOffset)) {
- if (xOffset < lastXOffset) {
- status = NEXT;
- } else if (xOffset > lastXOffset) {
- status = PREVIOUS;
- } else if (yOffset > lastYOffset) {
- status = UP;
- } else if (yOffset < lastYOffset) {
- status = DOWN;
- } else {
- assert(false);
- status = NEXT;
- }
- }
- lastXOffset = xOffset;
- lastYOffset = yOffset;
- }
- virtual void render() { render(0, 0); }
- //virtual void update();
- private:
- };
- //*************************************************************************************************
- #endif // end of file ( MPConnectionType.h )
|