1 /* 2 * Copyright 2010-2014 OpenXcom Developers. 3 * 4 * This file is part of OpenXcom. 5 * 6 * OpenXcom is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * OpenXcom is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 #ifndef OPENXCOM_INTERCEPTSTATE_H 20 #define OPENXCOM_INTERCEPTSTATE_H 21 22 #include <vector> 23 #include "../Engine/State.h" 24 25 namespace OpenXcom 26 { 27 28 class TextButton; 29 class Window; 30 class Text; 31 class TextList; 32 class Base; 33 class Globe; 34 class Craft; 35 class Target; 36 37 /** 38 * Intercept window that lets the player launch 39 * crafts into missions from the Geoscape. 40 */ 41 class InterceptState : public State 42 { 43 private: 44 TextButton *_btnCancel, *_btnGotoBase; 45 Window *_window; 46 Text *_txtTitle, *_txtCraft, *_txtStatus, *_txtBase, *_txtWeapons; 47 TextList *_lstCrafts; 48 Globe *_globe; 49 Base *_base; 50 Target *_target; 51 std::vector<Craft*> _crafts; 52 public: 53 /// Creates the Intercept state. 54 InterceptState(Game *game, Globe *globe, Base *base = 0, Target *target = 0); 55 /// Cleans up the Intercept state. 56 ~InterceptState(); 57 /// Handler for clicking the Cancel button. 58 void btnCancelClick(Action *action); 59 /// Handler for clicking the Go To Base button. 60 void btnGotoBaseClick(Action *action); 61 /// Handler for clicking the Crafts list. 62 void lstCraftsLeftClick(Action *action); 63 /// Handler for right clicking the Crafts list. 64 void lstCraftsRightClick(Action *action); 65 }; 66 67 } 68 69 #endif 70