2121#include " ../Resource/ResourcePack.h"
2222#include " ../Engine/Language.h"
2323#include " ../Engine/Palette.h"
24+ #include " ../Engine/Options.h"
2425#include " ../Interface/TextButton.h"
2526#include " ../Interface/Window.h"
2627#include " ../Interface/Text.h"
@@ -38,6 +39,7 @@ namespace OpenXcom
3839 * Initializes all the elements in a Dismantle Facility window.
3940 * @param game Pointer to the core game.
4041 * @param base Pointer to the base to get info from.
42+ * @param view Pointer to the baseview to update.
4143 * @param fac Pointer to the facility to dismantle.
4244 */
4345DismantleFacilityState::DismantleFacilityState (Game *game, Base *base, BaseView *view, BaseFacility *fac) : State(game), _base(base), _view(view), _fac(fac)
@@ -67,10 +69,12 @@ DismantleFacilityState::DismantleFacilityState(Game *game, Base *base, BaseView
6769 _btnOk->setColor (Palette::blockOffset (15 )+6 );
6870 _btnOk->setText (_game->getLanguage ()->getString (" STR_OK" ));
6971 _btnOk->onMouseClick ((ActionHandler)&DismantleFacilityState::btnOkClick);
70-
72+ _btnOk->onKeyboardPress ((ActionHandler)&DismantleFacilityState::btnOkClick, (SDLKey)Options::getInt (" keyCancel" ));
73+
7174 _btnCancel->setColor (Palette::blockOffset (15 )+6 );
7275 _btnCancel->setText (_game->getLanguage ()->getString (" STR_CANCEL_UC" ));
7376 _btnCancel->onMouseClick ((ActionHandler)&DismantleFacilityState::btnCancelClick);
77+ _btnCancel->onKeyboardPress ((ActionHandler)&DismantleFacilityState::btnCancelClick, (SDLKey)Options::getInt (" keyCancel" ));
7478
7579 _txtTitle->setColor (Palette::blockOffset (13 )+10 );
7680 _txtTitle->setAlign (ALIGN_CENTER );
0 commit comments