1717 * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
1818 */
1919#include " AlienTerrorState.h"
20- #include < sstream>
2120#include " ../Engine/Game.h"
2221#include " ../Resource/ResourcePack.h"
2322#include " ../Engine/Language.h"
@@ -36,20 +35,20 @@ namespace OpenXcom
3635{
3736
3837/* *
39- * Initializes all the elements in the Aliens Terrorise window.
38+ * Initializes all the elements in the Mission Detected window.
4039 * @param game Pointer to the core game.
41- * @param terror Pointer to the respective Terror Site.
42- * @param city Terrorized city name.
40+ * @param mission Pointer to the respective Mission Site.
41+ * @param city Attacked city name, if any .
4342 * @param state Pointer to the Geoscape.
4443 */
45- AlienTerrorState::AlienTerrorState (TerrorSite *terror , const std::string &city, GeoscapeState *state) : _terror(terror ), _state(state)
44+ MissionDetectedState::MissionDetectedState (MissionSite *mission , const std::string &city, GeoscapeState *state) : _mission(mission ), _state(state)
4645{
4746 _screen = false ;
4847
4948 // Create objects
5049 _window = new Window (this , 256 , 200 , 0 , 0 , POPUP_BOTH );
5150 _btnIntercept = new TextButton (200 , 16 , 28 , 130 );
52- _btnCentre = new TextButton (200 , 16 , 28 , 150 );
51+ _btnCenter = new TextButton (200 , 16 , 28 , 150 );
5352 _btnCancel = new TextButton (200 , 16 , 28 , 170 );
5453 _txtTitle = new Text (246 , 32 , 5 , 48 );
5554 _txtCity = new Text (246 , 17 , 5 , 80 );
@@ -59,7 +58,7 @@ AlienTerrorState::AlienTerrorState(TerrorSite *terror, const std::string &city,
5958
6059 add (_window, " window" , " terrorSite" );
6160 add (_btnIntercept, " button" , " terrorSite" );
62- add (_btnCentre , " button" , " terrorSite" );
61+ add (_btnCenter , " button" , " terrorSite" );
6362 add (_btnCancel, " button" , " terrorSite" );
6463 add (_txtTitle, " text" , " terrorSite" );
6564 add (_txtCity, " text" , " terrorSite" );
@@ -70,14 +69,14 @@ AlienTerrorState::AlienTerrorState(TerrorSite *terror, const std::string &city,
7069 _window->setBackground (_game->getResourcePack ()->getSurface (" BACK03.SCR" ));
7170
7271 _btnIntercept->setText (tr (" STR_INTERCEPT" ));
73- _btnIntercept->onMouseClick ((ActionHandler)&AlienTerrorState ::btnInterceptClick);
72+ _btnIntercept->onMouseClick ((ActionHandler)&MissionDetectedState ::btnInterceptClick);
7473
75- _btnCentre ->setText (tr (" STR_CENTER_ON_SITE_TIME_5_SECONDS" ));
76- _btnCentre ->onMouseClick ((ActionHandler)&AlienTerrorState::btnCentreClick );
74+ _btnCenter ->setText (tr (" STR_CENTER_ON_SITE_TIME_5_SECONDS" ));
75+ _btnCenter ->onMouseClick ((ActionHandler)&MissionDetectedState::btnCenterClick );
7776
7877 _btnCancel->setText (tr (" STR_CANCEL_UC" ));
79- _btnCancel->onMouseClick ((ActionHandler)&AlienTerrorState ::btnCancelClick);
80- _btnCancel->onKeyboardPress ((ActionHandler)&AlienTerrorState ::btnCancelClick, Options::keyCancel);
78+ _btnCancel->onMouseClick ((ActionHandler)&MissionDetectedState ::btnCancelClick);
79+ _btnCancel->onKeyboardPress ((ActionHandler)&MissionDetectedState ::btnCancelClick, Options::keyCancel);
8180
8281 _txtTitle->setBig ();
8382 _txtTitle->setAlign (ALIGN_CENTER );
@@ -92,38 +91,38 @@ AlienTerrorState::AlienTerrorState(TerrorSite *terror, const std::string &city,
9291/* *
9392 *
9493 */
95- AlienTerrorState ::~AlienTerrorState ()
94+ MissionDetectedState ::~MissionDetectedState ()
9695{
9796
9897}
9998
10099/* *
101- * Picks a craft to intercept the UFO .
100+ * Picks a craft to intercept the mission site .
102101 * @param action Pointer to an action.
103102 */
104- void AlienTerrorState ::btnInterceptClick (Action *)
103+ void MissionDetectedState ::btnInterceptClick (Action *)
105104{
106105 _state->timerReset ();
107- _state->getGlobe ()->center (_terror ->getLongitude (), _terror ->getLatitude ());
108- _game->pushState (new InterceptState (_state->getGlobe (), 0 , _terror ));
106+ _state->getGlobe ()->center (_mission ->getLongitude (), _mission ->getLatitude ());
107+ _game->pushState (new InterceptState (_state->getGlobe (), 0 , _mission ));
109108}
110109
111110/* *
112- * Centers on the UFO and returns to the previous screen.
111+ * Centers on the mission site and returns to the previous screen.
113112 * @param action Pointer to an action.
114113 */
115- void AlienTerrorState::btnCentreClick (Action *)
114+ void MissionDetectedState::btnCenterClick (Action *)
116115{
117116 _state->timerReset ();
118- _state->getGlobe ()->center (_terror ->getLongitude (), _terror ->getLatitude ());
117+ _state->getGlobe ()->center (_mission ->getLongitude (), _mission ->getLatitude ());
119118 _game->popState ();
120119}
121120
122121/* *
123122 * Returns to the previous screen.
124123 * @param action Pointer to an action.
125124 */
126- void AlienTerrorState ::btnCancelClick (Action *)
125+ void MissionDetectedState ::btnCancelClick (Action *)
127126{
128127 _game->popState ();
129128}
0 commit comments