1 /* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */ 2 3 #ifndef _QUIT_BOX_H 4 #define _QUIT_BOX_H 5 6 #include "InputReceiver.h" 7 8 //TOD add support for resigning without selfdestruction 9 class CQuitBox : 10 public CInputReceiver 11 { 12 public: 13 CQuitBox(); 14 ~CQuitBox(); 15 16 void Draw(); 17 18 bool IsAbove(int x, int y); 19 std::string GetTooltip(int x, int y); 20 21 bool MousePress(int x, int y, int button); 22 void MouseRelease(int x,int y,int button); 23 void MouseMove(int x, int y, int dx,int dy, int button); 24 bool KeyPressed(int key, bool isRepeat); 25 26 private: 27 ContainerBox box; 28 29 // in order of appereance ... 30 ContainerBox resignBox; 31 ContainerBox saveBox; 32 ContainerBox giveAwayBox; 33 ContainerBox teamBox; 34 ContainerBox quitBox; 35 ContainerBox cancelBox; 36 ContainerBox scrollbarBox; 37 ContainerBox scrollBox; 38 39 int shareTeam; 40 bool noAlliesLeft; 41 42 bool moveBox; 43 44 int startTeam; 45 int numTeamsDisp; 46 bool scrolling; 47 float scrollGrab; 48 bool hasScroll; 49 }; 50 51 #endif // _QUIT_BOX_H 52 53