00001 // --------------------------------------------------------------------------- 00002 // PLATFORM: All - 00003 // PRODUCT: Fourplay - 00004 // VISIBILITY: Public - 00005 // --------------------------------------------------------------------------- 00006 // - 00007 // PURPOSE: End menu to be displayed at the end of games. - 00008 // Allows players to quit, restart, and post highscores to server. - 00009 // - 00010 // --------------------------------------------------------------------------- 00011 00012 #ifndef ENDMENU_H 00013 #define ENDMENU_H 00014 00015 #include "Iw2D.h" 00016 #include "IwGx.h" 00017 #include "Input.h" 00018 #include "CInput.h" 00019 #include "CollisionManager.h" 00020 #include "HttpHandler.h" 00021 00027 class EndMenu 00028 { 00029 public: 00035 EndMenu(int matchResult, 00036 float matchTime); 00037 00041 ~EndMenu(); 00042 00047 int Update(); 00048 00052 void Draw(); 00053 00057 void PostScore(); 00058 00059 protected: 00061 CIwFVec2 m_position; 00062 00064 CIw2DImage *m_background; 00065 00067 CIw2DImage *m_quitButton; 00068 00070 CIw2DImage *m_restartButton; 00071 00073 CIw2DImage *m_uploadButton; 00074 00076 CIwFVec2 m_quitButtonPosition; 00077 00079 CIwFVec2 m_restartButtonPosition; 00080 00082 CIwFVec2 m_uploadButtonPosition; 00083 00085 HttpHandler *m_http; 00086 00088 int m_result; 00089 00091 float m_time; 00092 00094 static const int m_buttonDiameter = 100; 00095 00097 static const int m_buttonRadius = 50; 00098 00100 enum Result { REDWIN = 1, YELLOWWIN = 2, DRAW = 3 }; 00101 }; 00102 00103 #endif