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_SELECTDESTINATIONSTATE_H 20 #define OPENXCOM_SELECTDESTINATIONSTATE_H 21 22 #include "../Engine/State.h" 23 24 namespace OpenXcom 25 { 26 27 class Craft; 28 class Globe; 29 class InteractiveSurface; 30 class Timer; 31 class Window; 32 class Text; 33 class TextButton; 34 35 /** 36 * Screen that allows the player 37 * to pick a target for a craft on the globe. 38 */ 39 class SelectDestinationState : public State 40 { 41 private: 42 Craft *_craft; 43 Globe *_globe; 44 InteractiveSurface *_btnRotateLeft, *_btnRotateRight, *_btnRotateUp, *_btnRotateDown, *_btnZoomIn, *_btnZoomOut; 45 Window *_window; 46 Text *_txtTitle; 47 TextButton *_btnCancel, *_btnCydonia; 48 public: 49 /// Creates the Select Destination state. 50 SelectDestinationState(Game *game, Craft *craft, Globe *globe); 51 /// Cleans up the Select Destination state. 52 ~SelectDestinationState(); 53 /// Resets globe. 54 void init(); 55 /// Runs the timer. 56 void think(); 57 /// Handles actions. 58 void handle(Action *action); 59 /// Handler for clicking the globe. 60 void globeClick(Action *action); 61 /// Handler for pressing the Rotate Left arrow. 62 void btnRotateLeftPress(Action *action); 63 /// Handler for releasing the Rotate Left arrow. 64 void btnRotateLeftRelease(Action *action); 65 /// Handler for pressing the Rotate Right arrow. 66 void btnRotateRightPress(Action *action); 67 /// Handler for releasing the Rotate Right arrow. 68 void btnRotateRightRelease(Action *action); 69 /// Handler for pressing the Rotate Up arrow. 70 void btnRotateUpPress(Action *action); 71 /// Handler for releasing the Rotate Up arrow. 72 void btnRotateUpRelease(Action *action); 73 /// Handler for pressing the Rotate Down arrow. 74 void btnRotateDownPress(Action *action); 75 /// Handler for releasing the Rotate Down arrow. 76 void btnRotateDownRelease(Action *action); 77 /// Handler for left-clicking the Zoom In icon. 78 void btnZoomInLeftClick(Action *action); 79 /// Handler for right-clicking the Zoom In icon. 80 void btnZoomInRightClick(Action *action); 81 /// Handler for left-clicking the Zoom Out icon. 82 void btnZoomOutLeftClick(Action *action); 83 /// Handler for right-clicking the Zoom Out icon. 84 void btnZoomOutRightClick(Action *action); 85 /// Handler for clicking the Cancel button. 86 void btnCancelClick(Action *action); 87 /// Handler for clicking the Cydonia mission button. 88 void btnCydoniaClick(Action *action); 89 /// Let the state know the window has been resized. 90 void resize(int &dX, int &dY); 91 92 }; 93 94 } 95 96 #endif 97